Open guanyou-git opened 3 days ago
The following error indicates an issue with your applications code. Check to make sure the library is installed and the import is correctly specified in the component.
(NOBRIDGE) ERROR error is TypeError: Cannot read property 'authorize' of null
Issue
Started a new simple expo app, installed react-native-app-auth, configure the page as per this link with the correct values: https://commerce.nearform.com/open-source/react-native-app-auth/docs/providers/azure-active-directory-b2c
$ npx create-expo-app@latest $ npm i react-native-app-auth
configure code
`import { authorize } from 'react-native-app-auth';
export default function HomeScreen() {
const config = { issuer: 'https://.b2clogin.com/.onmicrosoft.com//v2.0',
clientId: '',
redirectUrl: 'msauth.com.appname://auth/', // the redirectUrl must end with a slash
scopes: ['openid', 'offline_access'],
};
const signIn = async () => { try { // Log in to get an authentication token const authState = await authorize(config); } catch (error) { console.error(
error is ${error}
); } };`...
$ npx expo start
when clicking on the function that does the signIn, I'll get the error (NOBRIDGE) ERROR error is TypeError: Cannot read property 'authorize' of null
Have any1 managed to make this library work with azure AD B2C and expo
in azure AD B2C, I have tried to add both iOS application as well as mobile & desktop application redirect URI as well the B2C configuration is tested to work fine with Web/SPA for SSO sign in.
Environment
platform experiencing issue on: iOS react-native version: 0.76.3 react-native-app-auth version: ^8.0.0 using Expo: yes
e.g. IdentityServer 4 / Okta / Azure
iOS / Android / both
react-native
Version:e.g. 0.72.1
react-native-app-auth
Version:e.g. 7.0.0