@microsoft/rayfin-auth-provider-fabric 1.33.0-beta.0 → 1.33.0-beta.2
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/assets/docs/index.md +9 -5
- package/package.json +4 -4
package/assets/docs/index.md
CHANGED
|
@@ -24,22 +24,26 @@ It performs a three-step waterfall:
|
|
|
24
24
|
|
|
25
25
|
Call it from a synchronous user gesture, such as a button click, because the broker step uses `window.open()`.
|
|
26
26
|
|
|
27
|
+
The example below reads its configuration from the Vite-projected environment variables the Rayfin CLI emits.
|
|
28
|
+
`rayfin up` writes `RAYFIN_PUBLIC_*` values to `rayfin/.env` and, when it detects a Vite or Next.js project, automatically projects them into `.env.local` as the `VITE_*` (or `NEXT_PUBLIC_*`) names shown here.
|
|
29
|
+
Run `rayfin env --framework <vite|nextjs|plain>` manually only if you need to regenerate `.env.local` outside those flows or target a framework that can't be auto-detected.
|
|
30
|
+
|
|
27
31
|
```typescript
|
|
28
32
|
import { ApiClient } from '@microsoft/rayfin-lib';
|
|
29
33
|
import { Auth } from '@microsoft/rayfin-auth';
|
|
30
34
|
import { ensureSignedInWithFabric } from '@microsoft/rayfin-auth-provider-fabric';
|
|
31
35
|
|
|
32
36
|
const apiClient = new ApiClient({
|
|
33
|
-
baseUrl:
|
|
34
|
-
publishableKey:
|
|
37
|
+
baseUrl: import.meta.env.VITE_RAYFIN_API_URL,
|
|
38
|
+
publishableKey: import.meta.env.VITE_RAYFIN_PUBLISHABLE_KEY,
|
|
35
39
|
});
|
|
36
40
|
|
|
37
41
|
const auth = new Auth(apiClient);
|
|
38
42
|
|
|
39
43
|
const fabricOptions = {
|
|
40
|
-
workspaceId:
|
|
41
|
-
projectId:
|
|
42
|
-
fabricPortalUrl:
|
|
44
|
+
workspaceId: import.meta.env.VITE_FABRIC_WORKSPACE_ID,
|
|
45
|
+
projectId: import.meta.env.VITE_FABRIC_ITEM_ID,
|
|
46
|
+
fabricPortalUrl: import.meta.env.VITE_FABRIC_PORTAL_URL,
|
|
43
47
|
returnOrigin: window.location.origin,
|
|
44
48
|
};
|
|
45
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/rayfin-auth-provider-fabric",
|
|
3
|
-
"version": "1.33.0-beta.
|
|
3
|
+
"version": "1.33.0-beta.2",
|
|
4
4
|
"description": "Fabric brokered authentication provider for Rayfin SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
],
|
|
14
14
|
"type": "module",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@microsoft/rayfin-auth": "1.33.0-beta.
|
|
17
|
-
"@microsoft/
|
|
18
|
-
"@microsoft/
|
|
16
|
+
"@microsoft/rayfin-auth": "1.33.0-beta.2",
|
|
17
|
+
"@microsoft/fabric-embedded-host": "1.33.0-beta.2",
|
|
18
|
+
"@microsoft/rayfin-lib": "1.33.0-beta.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"typescript": "^5.8.3",
|