Skip to content

Instantly share code, notes, and snippets.

@rschwabco
Created December 16, 2021 21:02
Show Gist options
  • Save rschwabco/418a21db8f1099e8b26d87186953744c to your computer and use it in GitHub Desktop.
Save rschwabco/418a21db8f1099e8b26d87186953744c to your computer and use it in GitHub Desktop.
Configuration for React app auth
const configuration = {
authority: `https://${process.env.REACT_APP_OIDC_DOMAIN}/dex`,
clientId: process.env.REACT_APP_OIDC_CLIENT_ID,
autoSignIn: true,
responseType: "id_token",
scope: "openid profile email",
redirectUri: window.location.origin,
audience: process.env.REACT_APP_OIDC_AUDIENCE,
onSignIn: () => {
window.location.replace(window.location.origin);
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment