FormidableLabs / FormidableLabs/react-native-app-auth

Catch Authentication Failed error in B2C

Open
#827 0 comments 0 reactions 0 assignees View on GitHub
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);
}

Screen Shot 2023-03-13 at 10 53 01 AM

```
---

## 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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.