Angular-oauth2-oidc: How to set acr_values

Created on 15 Jun 2018  路  2Comments  路  Source: manfredsteyer/angular-oauth2-oidc

I need to pass some configuration settings to the identity provider. My identity provider supports sending these settings through acr_values.

How can I send parameters through acr_values in angular-oauth2-oidc?

Most helpful comment

You could try to use customQueryParams on AuthConfig and see if that works? For example:

export const authConfig: AuthConfig = {
  issuer: 'https://steyer-identity-server.azurewebsites.net/identity',
  clientId: 'spa-demo',
  redirectUri: window.location.origin + '/index.html',
  silentRefreshRedirectUri: window.location.origin + '/silent-refresh.html',
  scope: 'openid profile email',
  customQueryParams: {
    acr_values: 'tenant:abc',
  }
};

I'm not sure if this is what you're after, and if it is how you'd send multiple different values though.

All 2 comments

You could try to use customQueryParams on AuthConfig and see if that works? For example:

export const authConfig: AuthConfig = {
  issuer: 'https://steyer-identity-server.azurewebsites.net/identity',
  clientId: 'spa-demo',
  redirectUri: window.location.origin + '/index.html',
  silentRefreshRedirectUri: window.location.origin + '/silent-refresh.html',
  scope: 'openid profile email',
  customQueryParams: {
    acr_values: 'tenant:abc',
  }
};

I'm not sure if this is what you're after, and if it is how you'd send multiple different values though.

Thank you very much @jeroenheijmans. I'll test that.

Was this page helpful?
0 / 5 - 0 ratings