@smarthivelabs-devs/auth-expo 1.6.3 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +2 -4
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -562,13 +562,12 @@ import express from "express";
562
562
  const router = express.Router();
563
563
 
564
564
  const SMARTHIVE_BASE = process.env.SMARTHIVE_AUTH_BASE_URL!; // https://authcore.smarthivelabs.dev
565
- const SMARTHIVE_ENV = process.env.SMARTHIVE_AUTH_ENVIRONMENT!; // prod
566
565
  const SMARTHIVE_PID = process.env.SMARTHIVE_AUTH_PROJECT_ID!;
567
566
  const APP_BASE_URL = process.env.APP_BASE_URL!; // https://api.yourapp.com
568
567
 
569
568
  // Initiation — app calls this, proxy forwards to SmartHive
570
569
  router.get("/:provider", async (req, res) => {
571
- const target = new URL(`${SMARTHIVE_BASE}/${SMARTHIVE_ENV}/api/auth/social/${req.params.provider}`);
570
+ const target = new URL(`${SMARTHIVE_BASE}/api/auth/social/${req.params.provider}`);
572
571
  target.searchParams.set("project_id", SMARTHIVE_PID);
573
572
  if (req.query.redirect_uri) target.searchParams.set("redirect_uri", req.query.redirect_uri as string);
574
573
  target.searchParams.set("proxy_callback", `${APP_BASE_URL}/api/auth/social/${req.params.provider}/callback`);
@@ -577,7 +576,7 @@ router.get("/:provider", async (req, res) => {
577
576
 
578
577
  // Callback — Google/Apple calls this, proxy forwards to SmartHive
579
578
  router.get("/:provider/callback", async (req, res) => {
580
- const target = new URL(`${SMARTHIVE_BASE}/${SMARTHIVE_ENV}/api/auth/social/${req.params.provider}/callback`);
579
+ const target = new URL(`${SMARTHIVE_BASE}/api/auth/social/${req.params.provider}/callback`);
581
580
  for (const [k, v] of Object.entries(req.query)) target.searchParams.set(k, v as string);
582
581
  res.redirect(target.toString());
583
582
  });
@@ -588,7 +587,6 @@ app.use("/api/auth/social", router);
588
587
  Required env vars on your backend:
589
588
  ```env
590
589
  SMARTHIVE_AUTH_BASE_URL=https://authcore.smarthivelabs.dev
591
- SMARTHIVE_AUTH_ENVIRONMENT=prod
592
590
  APP_BASE_URL=https://api.yourapp.com
593
591
  ```
594
592
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smarthivelabs-devs/auth-expo",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "description": "SmartHive Auth provider, hooks, and SecureStore integration for React Native / Expo",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "LICENSE"
26
26
  ],
27
27
  "dependencies": {
28
- "@smarthivelabs-devs/auth-sdk": "^1.5.2"
28
+ "@smarthivelabs-devs/auth-sdk": "^1.5.3"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "expo-auth-session": ">=55",
@@ -43,7 +43,7 @@
43
43
  "react-native": "^0.85.2",
44
44
  "tsup": "^8.5.1",
45
45
  "typescript": "^6.0.3",
46
- "@smarthivelabs-devs/auth-sdk": "^1.5.2"
46
+ "@smarthivelabs-devs/auth-sdk": "^1.5.3"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsup",