Skip to content

CORS error discovery/v2.0/keys #563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SamiiS opened this issue Jun 5, 2019 · 1 comment
Closed

CORS error discovery/v2.0/keys #563

SamiiS opened this issue Jun 5, 2019 · 1 comment

Comments

@SamiiS
Copy link

SamiiS commented Jun 5, 2019

We're trying to get rid of CORS errors now and this one makes it so that we can't login and authorize with Azure AD. What to do to make it work?

We're using ionic 4/angular 7 with a .net api.
Calling on Azure AD to get tokens from the application and then sending authorization tokens with the api requests to the api.

`import { AuthConfig } from 'angular-oauth2-oidc';

export const authConfig: AuthConfig = {

// Url of the Identity Provider
issuer: 'https://login.microsoftonline.com/XXX/v2.0',

loginUrl: 'https://login.microsoftonline.com/XXX/oauth2/v2.0/authorize',

// URL of the SPA to redirect the user to after login
redirectUri: window.location.origin + '/login',
// redirectUri: 'msauth://XXX',

// URL of the SPA to redirect the user to after logout
postLogoutRedirectUri: 'XXX',

// The SPA's id. The SPA is registerd with this id at the auth-server
clientId: 'XXX',

// set the scope for the permissions the client should request
// The first three are defined by OIDC. The 4th is a usecase-specific one
scope: 'openid profile email api://XXX/access_as_user',
// Atm we cant access our own server from redirecturi with ssl, so with this command we disable https
requireHttps: false,
// declares that we are using oidc
oidc: true,
// loosens the rules for getting document data(which means retrieving the accesstoken and identityclaims etc.)
// if true, the data is put in an anchor in the address bar and are not reachable from methods like "x.getAccessToken()"
strictDiscoveryDocumentValidation: false,

};
`

@jeroenheijmans
Copy link
Collaborator

jeroenheijmans commented Jun 5, 2019

Possibly a duplicate of #494? (At the least you might find useful info there.)

@SamiiS SamiiS closed this as completed Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants