Open scott-david-walker opened 3 years ago
@scott-david-walker - hello again! You are correct - the samples are currently using version 4.x of the okta-signin-widget.
otka-signin-widget 5.x is a recent release and we are still updating our various samples and guides to reflect the changes.
In the meantime, if you are interested in using the latest okta-signin-widget, you can apply the steps listed in our migration guide: https://github.com/okta/okta-signin-widget/blob/master/MIGRATING.md#migrating-from-4x-to-5x, in particular the first two items apply to what you are describing:
How to store tokens in showSignInToGetTokens, so okta auth can see them?
@cysieks - We have not yet updated this sample to use the 5.x version of the okta-signin-widget to show that flow, but until we do hopefully this gives you enough information:
the calls would be similar to:
tokenManager.add('idToken', tokens.idToken);
tokenManager.add('accessToken', tokens.accessToken);
I used the basic skeleton of the sample project to start my own project and ran into issues with Okta not redirecting after successful authentication. After a chunk of debugging, I realised that I am on the latest version of the Okta Sign In Widget (^5.0.1) whilst the sample project is on ^4.4.4. If I downgrade to 4.4.4 then the redirect works as expected.
To confirm, I upgraded the sample project to "@okta/okta-signin-widget": "^5.0.1", and can confirm that the redirect no longer works after successful authentication.
Is there another package I need to install for it to work on this version or am I missing something simple?