From 14a207c8ba75694e733242059af43c0c03fa6031 Mon Sep 17 00:00:00 2001 From: Alisa <7586237+alisaduncan@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:35:58 -0500 Subject: [PATCH] Update to add refresh tokens (#5) --- README.md | 5 ++++- src/app/app.module.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 97ddcc3..7489a96 100644 --- a/README.md +++ b/README.md @@ -50,13 +50,16 @@ Issuer: https://.okta.com/oauth2/default 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'] }); ``` diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8b225a3..159f00d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -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({