Skip to content

Commit

Permalink
feat: reduce scope to just openid
Browse files Browse the repository at this point in the history
  • Loading branch information
glenngillen committed Sep 2, 2024
1 parent 16b9279 commit 0435887
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const Auth0 = new Auth0Client({
domain: publicRuntimeConfig.auth0.issuerBaseHost as string,
clientId: publicRuntimeConfig.auth0.clientId as string,
authorizationParams: {
scope: 'openid',
redirect_uri: `${publicRuntimeConfig.auth0.baseUrl}/auth/callback`,
},
});
Expand All @@ -38,6 +39,7 @@ const currentUser = async (): Promise<User | void> => {
const userId = window.sessionStorage.getItem('userId') as string | '';
const token = await Auth0.getTokenSilently({
authorizationParams: {
scope: 'openid',
audience,
},
});
Expand Down Expand Up @@ -128,6 +130,7 @@ const Auth: FunctionComponent<Props> = ({
const signin = useCallback(async (): Promise<void> => {
await Auth0.loginWithRedirect({
authorizationParams: {
scope: 'openid',
audience,
source: 'ockam-website',
},
Expand All @@ -137,6 +140,7 @@ const Auth: FunctionComponent<Props> = ({
const signup = useCallback(async (): Promise<void> => {
await Auth0.loginWithRedirect({
authorizationParams: {
scope: 'openid',
audience,
screen_hint: 'signup',
source: 'ockam-website',
Expand Down

0 comments on commit 0435887

Please sign in to comment.