@drmhse/sso-sdk 0.3.13 → 0.3.14

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.
package/README.md CHANGED
@@ -138,11 +138,15 @@ const loginUrl = sso.auth.getLoginUrl('github', {
138
138
  });
139
139
  window.location.href = loginUrl;
140
140
 
141
- // Handle callback - initialize client with token from OAuth callback
142
- const params = new URLSearchParams(window.location.search);
143
- const accessToken = params.get('access_token');
141
+ // Handle callback - tokens are returned in URL fragment (#) for security
142
+ // (prevents tokens from being logged in server access logs)
143
+ const hashParams = new URLSearchParams(window.location.hash.substring(1));
144
+ const accessToken = hashParams.get('access_token');
144
145
 
145
146
  if (accessToken) {
147
+ // Clear hash from URL for security
148
+ window.history.replaceState(null, '', window.location.pathname);
149
+
146
150
  // Initialize SDK with OAuth token - automatically stored
147
151
  const sso = new SsoClient({
148
152
  baseURL: 'https://sso.example.com',
package/dist/index.d.mts CHANGED
@@ -1060,10 +1060,12 @@ interface Plan {
1060
1060
  id: string;
1061
1061
  service_id: string;
1062
1062
  name: string;
1063
+ description?: string;
1063
1064
  price_cents: number;
1064
1065
  currency: string;
1065
1066
  features: string;
1066
1067
  stripe_price_id?: string;
1068
+ is_default?: boolean;
1067
1069
  created_at: string;
1068
1070
  }
1069
1071
  /**
@@ -1124,20 +1126,24 @@ interface ServiceResponse {
1124
1126
  */
1125
1127
  interface CreatePlanPayload {
1126
1128
  name: string;
1129
+ description?: string;
1127
1130
  price_cents: number;
1128
1131
  currency: string;
1129
1132
  features?: string[];
1130
1133
  stripe_price_id?: string;
1134
+ is_default?: boolean;
1131
1135
  }
1132
1136
  /**
1133
1137
  * Update plan payload
1134
1138
  */
1135
1139
  interface UpdatePlanPayload {
1136
1140
  name?: string;
1141
+ description?: string;
1137
1142
  price_cents?: number;
1138
1143
  currency?: string;
1139
1144
  features?: string[];
1140
1145
  stripe_price_id?: string | null;
1146
+ is_default?: boolean;
1141
1147
  }
1142
1148
  /**
1143
1149
  * Service with aggregated details
package/dist/index.d.ts CHANGED
@@ -1060,10 +1060,12 @@ interface Plan {
1060
1060
  id: string;
1061
1061
  service_id: string;
1062
1062
  name: string;
1063
+ description?: string;
1063
1064
  price_cents: number;
1064
1065
  currency: string;
1065
1066
  features: string;
1066
1067
  stripe_price_id?: string;
1068
+ is_default?: boolean;
1067
1069
  created_at: string;
1068
1070
  }
1069
1071
  /**
@@ -1124,20 +1126,24 @@ interface ServiceResponse {
1124
1126
  */
1125
1127
  interface CreatePlanPayload {
1126
1128
  name: string;
1129
+ description?: string;
1127
1130
  price_cents: number;
1128
1131
  currency: string;
1129
1132
  features?: string[];
1130
1133
  stripe_price_id?: string;
1134
+ is_default?: boolean;
1131
1135
  }
1132
1136
  /**
1133
1137
  * Update plan payload
1134
1138
  */
1135
1139
  interface UpdatePlanPayload {
1136
1140
  name?: string;
1141
+ description?: string;
1137
1142
  price_cents?: number;
1138
1143
  currency?: string;
1139
1144
  features?: string[];
1140
1145
  stripe_price_id?: string | null;
1146
+ is_default?: boolean;
1141
1147
  }
1142
1148
  /**
1143
1149
  * Service with aggregated details
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drmhse/sso-sdk",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
4
4
  "description": "Zero-dependency TypeScript SDK for AuthOS, the multi-tenant authentication platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -18,7 +18,8 @@
18
18
  }
19
19
  },
20
20
  "files": [
21
- "dist"
21
+ "dist",
22
+ "README.md"
22
23
  ],
23
24
  "scripts": {
24
25
  "build": "tsup src/index.ts --format cjs,esm --dts --clean",