Skip to content

Commit e078fdf

Browse files
committed
fix(auth): use web app credentials for mobile ROPG refresh
1 parent 3d84824 commit e078fdf

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

src/js/auth/mobile.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@ import { AUTH_CONFIG_SERVER } from '../../Config'
44

55
if (AUTH_CONFIG_SERVER == null) throw new Error('AUTH_CONFIG_SERVER not defined')
66

7-
const mobileAuthSecret = process.env.MOBILE_AUTH_SECRET
8-
if (mobileAuthSecret == null) {
9-
console.warn('Mobile auth secret not found')
10-
}
11-
12-
const { mobileClientId, issuer } = AUTH_CONFIG_SERVER
7+
const { clientId, clientSecret, issuer } = AUTH_CONFIG_SERVER
138

14-
// Set up Auth0 client for mobile with client secret for ROPG flow
9+
// Set up Auth0 client for mobile ROPG using web app credentials (confidential client)
1510
export const auth0Client = new Auth0.AuthenticationClient({
1611
domain: issuer.replace('https://', ''),
17-
clientId: mobileClientId,
18-
clientSecret: mobileAuthSecret
12+
clientId,
13+
clientSecret
1914
})
2015

2116
export const isNullOrEmpty = (str: string | null | undefined): boolean => {

0 commit comments

Comments
 (0)