Closed jliukai closed 3 months ago
Please check the issue #27 and give your feedback here 🙏🏻
same @vmurin issue for me i have checked https://github.com/vmurin/react-native-azure-auth/issues/27
here is the intent filter`
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="msauth"
android:host="package-name"
android:pathPrefix="/signature-hash"
/>
</intent-filter>` in place of package-name i have used my real package name
in place of signature-hash i have used my signature-hash
same problem :( @qwert251102
I tried different variants, one at a time, Androidmanifest.xml. none worked
following https://github.com/vmurin/react-native-azure-auth/issues/27 tried variant 2,3 and 4. failed.
# Androidmanifest.xml
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- variant 0 start from author's docs. -->
<data
android:pathPrefix="/android/callback"
android:host="${applicationId}"
android:scheme="${applicationId}"
/>
<!-- variant 0 end -->
<!-- variation 1 start -->
<data
android:scheme="msauth"
android:host="com.<my package name>"
android:pathPrefix="/gYxxxxxxxxxxxxxZbo"
/>
<!-- variation 1 end-->
<!-- variation 2 start -->
<data
android:host="auth"
android:scheme="msauth://com.myapp.prod/gYxxxxxxxxxxxxxxZbo%3D" // from android redirect
/>
<!-- variation 2 end -->
<!-- variation 3 start -->
<data
android:host="auth"
android:scheme="msal2b9xxxxxxxxxxxxxxxxxxxx2a3://auth" // from mobile/desktop redirect
/>
<!-- variation 3 end -->
<!-- variation 4 start -->
<data
android:host="auth"
android:scheme="msal2b9xxxxxxxxxxxxxxxxxxxx2a3" // from mobile/desktop redirect
/>
<!-- variation 4 end -->
</intent-filter>
// react native code
const azureAuth = new AzureAuth({ clientId, redirectUri })
const tokens = await azureAuth.webAuth.authorize({
scope: 'email openid profile User.Read offline_access',
prompt: 'select_account'
})
deployment_cert.der
keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64
to generate the hashI still have problem where "continue" button doesnt do anything. im sure its something wrong with redirect url or some config around that.
as a side note, iOS microsoft sign in with this library works fine.
Hi @jliukai
please try following:
android:pathPrefix="/android/callback"
android:host="com..prod"
android:scheme="com..prod"
here supposed "com..prod" is your package name and it is correctly put in the Azure App registration as the callback URI
redirectUri
variable in the code const azureAuth = new AzureAuth({ clientId, redirectUri })
It should be exactly copy-pasted from Azure URIs listThe main rule: App registration callback URI === redirectUri variable === android:scheme + :// + android:host + android:pathPrefix
it worked!! thank you thank you!!!
# androidManifest.xml
<data
android:pathPrefix="/android/callback"
android:host="${applicationId}"
android:scheme="${applicationId}"
/>
@jliukai thank you for your feedback
Problem
When I attempt to sign in, and press "continue" it does nothing.
Setup
in the Entra auth page,
const azureAuth = new AzureAuth({ clientId: Config.MICROSOFT_CLIENT_ID, redirectUri: Config.MICROSOFT_REDIRECT_URI_ANDROID })
const tokens = await azureAuth.webAuth.authorize({ scope: 'email openid profile User.Read offline_access', prompt: 'select_account' }) console.log('tokens') // <--- never gets to here