Hi,
I am trying to use this to add oAuth2 into my angular application but the identity provider that I am tying to connect to does not have a URL with the /.well-known/openid-configuration.
Is there any way of configuring it so that this service does not automatically add this extension onto the issuer URL that I am configuring.
Many thanks
There are two options:
loadDisco...(...) function, see this sourceloadDiscoveryDocument...(...) functions, configure all the things that would come from the document yourself on the library's service, and call one of the login methods directlyTake for instance the Discord oauth login process. How would you do that?
Have you tried either of the two methods I suggested? Could you share what you have so far?
I finally got it working using the following config:
authConfig: AuthConfig = {
loginUrl: `${discordApiUrl}/oauth2/authorize`,
redirectUri: `${environment.appUrl}/login-success`,
clientId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
scope: 'guilds connections identify',
strictDiscoveryDocumentValidation: false,
responseType: 'token',
oidc: false
};
Followed by
this.oauthService.configure(authConfig);
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
this.oauthService.tryLogin();
@westlakem i am having some problem regarding requesting oauth2 api with angular .
always getting error of unauthorized
can you help me in this regard?
thanks
@mrrobot09 I would need much more context, and the last time I dealt with this was months ago... Not sure how much help I would be.
Seems Original Poster solved their issue, so closing this issue seems reasonable.
@mrrobot09 see previous comment, we'd need more context and details. Could you consider opening a new issue (or posting a StackOverflow question), adding enough details to reproduce your problem?
Most helpful comment
I finally got it working using the following config:
Followed by