Skip to content

Commit 8301986

Browse files
Merge branch 'master' of https://github.com/auth0/react-native-auth0 into feat/flexible-factors-grant-support
2 parents f24bcbe + 115008a commit 8301986

24 files changed

Lines changed: 379 additions & 225 deletions

File tree

.github/actions/rl-scanner/action.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,43 @@ permissions:
1717

1818
jobs:
1919
rl-scanner:
20-
uses: ./.github/workflows/rl-secure.yml
21-
with:
22-
node-version: '22'
23-
artifact-name: 'react-native-auth0.tgz'
24-
secrets:
25-
RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
26-
RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
27-
SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }}
28-
PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }}
29-
PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }}
30-
PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
20+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v6
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup
28+
uses: ./.github/actions/setup
29+
30+
- name: Build package
31+
run: yarn build
32+
33+
- name: Create tgz build artifact
34+
run: |
35+
tar -czvf react-native-auth0.tgz *
36+
37+
- name: Get version
38+
id: get_version
39+
run: |
40+
version=$(head -1 .version)
41+
echo "version=$version" >> $GITHUB_OUTPUT
42+
43+
- name: Run RL Scanner
44+
uses: auth0/devsecops-tooling/.github/actions/rl-scan@main
45+
with:
46+
artifact-name: 'react-native-auth0'
47+
artifact-path: '${{ github.workspace }}/react-native-auth0.tgz'
48+
version: ${{ steps.get_version.outputs.version }}
49+
RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
50+
RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
51+
SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }}
52+
SIGNAL_HANDLER_DOMAIN: ${{ secrets.SIGNAL_HANDLER_DOMAIN }}
53+
PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
54+
PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }}
55+
PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }}
56+
PRODSEC_PYTHON_TOOLS_REPO: ${{ secrets.PRODSEC_PYTHON_TOOLS_REPO }}
3157

3258
release:
3359
uses: ./.github/workflows/npm-release.yml

.github/workflows/rl-secure.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v5.5.1
1+
v5.6.0

A0Auth0.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
s.source_files = 'ios/**/*.{h,m,mm,swift}'
1717
s.requires_arc = true
1818

19-
s.dependency 'Auth0', '2.18.0'
19+
s.dependency 'Auth0', '2.19.0'
2020

2121
install_modules_dependencies(s)
2222
end

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Change Log
22

3+
## [5.6.0](https://github.com/auth0/react-native-auth0/tree/v5.6.0) (2026-05-14)
4+
5+
[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v5.5.1...v5.6.0)
6+
7+
**Added**
8+
9+
- feat: surface DPoP credential state errors from native SDKs [\#1529](https://github.com/auth0/react-native-auth0/pull/1529) ([@subhankarmaiti](https://github.com/subhankarmaiti))
10+
- feat(android): expose allowedBrowserPackages option for web authentication [\#1513](https://github.com/auth0/react-native-auth0/pull/1513) ([@mrbrentkelly](https://github.com/mrbrentkelly))
11+
12+
**Fixed**
13+
14+
- fix: apply deepCamelCase to MFA challenge response [\#1510](https://github.com/auth0/react-native-auth0/pull/1510) ([@AkhtarZaman7](https://github.com/AkhtarZaman7))
15+
- docs: add Expo callback URL format to README [\#1522](https://github.com/auth0/react-native-auth0/pull/1522) ([@subhankarmaiti](https://github.com/subhankarmaiti))
16+
317
## [v5.5.1](https://github.com/auth0/react-native-auth0/tree/v5.5.1) (2026-04-23)
418

519
[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v5.5.0...v5.5.1)

EXAMPLES.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
- [Android](#android)
6868
- [iOS](#ios)
6969
- [Expo](#expo)
70+
- [Allowed Browsers (Android)](#allowed-browsers-android)
7071

7172
## Authentication API
7273

@@ -1660,6 +1661,67 @@ If you want to support multiple domains, you would have to pass an array of obje
16601661
16611662
You can skip sending the `customScheme` property if you do not want to customize it.
16621663
1664+
## Allowed Browsers (Android)
1665+
1666+
On Android, some browsers do not correctly handle App Link redirects. For example, Firefox renders the callback URL as a web page instead of handing the redirect back to your app, causing the authentication flow to fail silently.
1667+
1668+
You can restrict which browsers are allowed to handle the web authentication flow by passing `allowedBrowserPackages` in the options object. When set, only browsers whose package names appear in the list will be used.
1669+
1670+
**Behaviour:**
1671+
1672+
- If the user's default browser is in the list, it is used.
1673+
- If the user's default browser is not in the list but another allowed browser is installed, that browser is used instead.
1674+
- If no allowed browser is installed, an `a0.browser_not_available` error is returned.
1675+
1676+
> **Platform Support:** Android only. This option is ignored on iOS.
1677+
1678+
### Using with Hooks
1679+
1680+
```typescript
1681+
import { useAuth0 } from 'react-native-auth0';
1682+
1683+
const { authorize } = useAuth0();
1684+
1685+
await authorize(
1686+
{ scope: 'openid profile email' },
1687+
{
1688+
allowedBrowserPackages: [
1689+
'com.android.chrome',
1690+
'com.chrome.beta',
1691+
'com.microsoft.emmx', // Edge
1692+
'com.brave.browser',
1693+
'com.sec.android.app.sbrowser', // Samsung Internet
1694+
],
1695+
}
1696+
);
1697+
```
1698+
1699+
### Using with Auth0 Class
1700+
1701+
```typescript
1702+
import Auth0 from 'react-native-auth0';
1703+
1704+
const auth0 = new Auth0({
1705+
domain: 'YOUR_AUTH0_DOMAIN',
1706+
clientId: 'YOUR_AUTH0_CLIENT_ID',
1707+
});
1708+
1709+
await auth0.webAuth.authorize(
1710+
{ scope: 'openid profile email' },
1711+
{
1712+
allowedBrowserPackages: [
1713+
'com.android.chrome',
1714+
'com.chrome.beta',
1715+
'com.microsoft.emmx', // Edge
1716+
'com.brave.browser',
1717+
'com.sec.android.app.sbrowser', // Samsung Internet
1718+
],
1719+
}
1720+
);
1721+
```
1722+
1723+
The same `allowedBrowserPackages` option is also accepted by `clearSession` to restrict which browser handles the logout flow.
1724+
16631725
## DPoP (Demonstrating Proof-of-Possession)
16641726
16651727
[DPoP](https://datatracker.ietf.org/doc/html/rfc9449) (Demonstrating Proof-of-Possession) is an OAuth 2.0 extension that cryptographically binds access and refresh tokens to a client-specific key pair. This prevents token theft and replay attacks by ensuring that even if a token is intercepted, it cannot be used from a different device.

0 commit comments

Comments
 (0)