oidc-angular | AngularJS Library for token based authentication | Authentication library
kandi X-RAY | oidc-angular Summary
kandi X-RAY | oidc-angular Summary
AngularJS Library for token based authentication
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Decode a base - 64 string
- Encode an array as a string
- Parses a query string into an object
- Get byte number from string
- get byte number
oidc-angular Key Features
oidc-angular Examples and Code Snippets
Community Discussions
Trending Discussions on oidc-angular
QUESTION
I cloned the example repo at https://github.com/onelogin/onelogin-oidc-angular and changed the config details to point to my Onelogin instance. However, I am having a few issues getting the logout and automatic token renewal functionalities to work out of the box.
For the logout functionality, I called the signoutRedirect
function from the oidc-client.js
library. I also made sure that the post logout redirect URI is set in the Auth service. post_logout_redirect_uri: 'http://localhost:4200/logout'
However, when I trigger the logout functionality, i notice it does clear the session storage (where the tokens and other metadata are stored by default), but it also logs a console error message and does not redirect to the logout route as configured above.
The error message is: Error: no end session endpoint
. Please note that, the provided authority field value in the auth.service.ts
file in the repo (https://openid-connect.onelogin-shadow01.com/oidc
) did not work for us, so we switched it to: https://xxx.onelogin.com/oidc/.well-known/openid-configuration
.
As per the supporting blog provided for instructions on how to test the silent auto token renewal (https://www.scottbrady91.com/OpenID-Connect/Silent-Refresh-Refreshing-Access-Tokens-when-using-the-Implicit-Flow), I kept the network tab open to see if requests are automatically sent to renew the token. I did see the auth endpoint being called close to the token expiration (1 hr), however, the id tokens + metadata stored in the session storage by default does not get updated.
Is there another step we are missing to manually adjust the token upon renewal?
Thank you!
...ANSWER
Answered 2019-Sep-11 at 22:02in oidc-client.js there is an event addUserLoaded, you have to listen to it na dthat will help you to load and update the new user with metadata
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oidc-angular
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page