FormidableLabs / FormidableLabs/react-native-app-auth
Catch Authentication Failed error in B2C
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 473
- PR merge metrics
- No merged PRs in 30d
Description
## Issue
Hi All,
I am using the B2C authentication, here I could n't get the error or failure response when we using the invalid username and password. I was expecting that any of authorize response or exception in catch block. If I get any error response, I can log in to my server as like authentication failed.
```
try {
const config = {
issuer: url(),
clientId: clientId(),
redirectUrl: 'app://token/',
scopes: ['openid', 'offline_access', clientId()],
iosPrefersEphemeralSession: true,
};
const result = await authorize(config);
console.log('B2CResult -----***', result);
return result;
} catch (error) {
console.log('Consoeoooo ---*****>', error);
}

```
---
## Environment
* **Your Identity Provider**: `Azure B2C`
* **Platform that you're experiencing the issue on**: `iOS / Android / both`
* **Are you using Expo?** No
* **"react-native-app-auth": "^7.0.0-rc2",
Contributor guide
Assessment
This issue has not been assessed yet.