Skip to content

Commit

Permalink
Update to add refresh tokens (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisaduncan authored Aug 23, 2024
1 parent d9df2f4 commit 14a207c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ Issuer: https://<OKTA_DOMAIN>.okta.com/oauth2/default
Client ID: <CLIENT_ID>
```

Sign into your [Okta Developer Edition account](https://developer.okta.com/login/) to add a required setting to your SPA Okta app to avoid third-party cookies. Navigate to **Applications** > **Applications** and select "My SPA" application to edit. Find the **General Settings** and press **Edit**. Enable **Refresh Token** in the **Grant type** section. **Save** your changes.

Update src/app/app.module.ts with your Okta settings.

```ts
const oktaAuth = new OktaAuth({
clientId: '{yourClientID}',
issuer: 'https://{yourOktaDomain}/oauth2/default',
redirectUri: window.location.origin + '/login/callback'
redirectUri: window.location.origin + '/login/callback',
scopes: ['openid', 'offline_access']
});
```

Expand Down
1 change: 1 addition & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const oktaAuth = new OktaAuth({
issuer: 'https://{yourOktaDomain}/oauth2/default',
clientId: '{yourClientID}',
redirectUri: window.location.origin + '/login/callback',
scopes: ['openid', 'offline_access']
});

@NgModule({
Expand Down

0 comments on commit 14a207c

Please sign in to comment.