@shad-claiborne/basic-oidc 1.0.0 → 1.0.1
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 +6 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,9 +16,12 @@ const authURL = authRequest.toURL();
|
|
|
16
16
|
const window.location.replace(authURL.href);
|
|
17
17
|
// IdP redirects back to https://this-app.com/basic-oidc/callback -
|
|
18
18
|
// i.e. A user has granted us authorization
|
|
19
|
-
const authResponseParams =
|
|
20
|
-
|
|
21
|
-
const
|
|
19
|
+
const authResponseParams =
|
|
20
|
+
new URLSearchParams(window.location.hash.substring(1));
|
|
21
|
+
const authResponse =
|
|
22
|
+
Object.fromEntries(authResponseParams) as AuthorizationResponse;
|
|
23
|
+
const tokenSet:TokenSet =
|
|
24
|
+
await client.requestAccess(authResponse, codeChallenge);
|
|
22
25
|
const id:Identity = await provider.getIdentity(client, tokenSet);
|
|
23
26
|
// await client.revokeAccess(tokenSet);
|
|
24
27
|
```
|
package/package.json
CHANGED