File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ interface AUTH_CONFIG_SERVER_TYPE {
1212 issuer : string
1313 clientId : string
1414 clientSecret : string
15+ mobileClientId : string
1516 mgmtClientId : string
1617 mgmtClientSecret : string
1718 mgmtClientAudience : string
@@ -25,6 +26,7 @@ if (typeof window === 'undefined') {
2526 issuer : checkAndPrintWarning ( 'AUTH0_DOMAIN' , process . env . AUTH0_DOMAIN ) ,
2627 clientId : checkAndPrintWarning ( 'AUTH0_CLIENT_ID' , process . env . AUTH0_CLIENT_ID ) ,
2728 clientSecret : checkAndPrintWarning ( 'AUTH0_CLIENT_SECRET' , process . env . AUTH0_CLIENT_SECRET ) ,
29+ mobileClientId : checkAndPrintWarning ( 'AUTH0_MOBILE_CLIENT_ID' , process . env . AUTH0_MOBILE_CLIENT_ID ) ,
2830 mgmtClientId : checkAndPrintWarning ( 'AUTH0_MGMT_CLIENT_ID' , process . env . AUTH0_MGMT_CLIENT_ID ) ,
2931 mgmtClientSecret : checkAndPrintWarning ( 'AUTH0_MGMT_CLIENT_SECRET' , process . env . AUTH0_MGMT_CLIENT_SECRET ) ,
3032 mgmtClientAudience : checkAndPrintWarning ( 'AUTH0_MGMT_CLIENT_AUDIENCE' , process . env . AUTH0_MGMT_CLIENT_AUDIENCE ) ,
Original file line number Diff line number Diff line change @@ -8,13 +8,12 @@ if (process.env.MOBILE_AUTH_SECRET == null) {
88 console . warn ( 'Mobile auth secret not found' )
99}
1010
11- const { clientSecret , clientId , issuer } = AUTH_CONFIG_SERVER
11+ const { mobileClientId , issuer } = AUTH_CONFIG_SERVER
1212
13- // Set up Auth0 client
13+ // Set up Auth0 client for mobile (Native app - no client secret needed)
1414export const auth0Client = new Auth0 . AuthenticationClient ( {
1515 domain : issuer . replace ( 'https://' , '' ) ,
16- clientId,
17- clientSecret
16+ clientId : mobileClientId
1817} )
1918
2019export const isNullOrEmpty = ( str : string | null | undefined ) : boolean => {
You can’t perform that action at this time.
0 commit comments