Skip to content

Commit a99229d

Browse files
author
Kadi Kraman
authored
Merge pull request FormidableLabs#557 from FusionAuth/main
Add FusionAuth configuration
2 parents f4c304b + 2d496a8 commit a99229d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ These providers are OpenID compliant, which means you can use [autodiscovery](ht
2525

2626
- [Identity Server4](https://demo.identityserver.io/) ([Example configuration](./docs/config-examples/identity-server-4.md))
2727
- [Identity Server3](https://github.com/IdentityServer/IdentityServer3.md) ([Example configuration](./docs/config-examples/identity-server-3.md))
28+
- [FusionAuth](https://fusionauth.io) ([Example configuration](./docs/config-examples/fusionauth.md))
2829
- [Google](https://developers.google.com/identity/protocols/OAuth2)
2930
([Example configuration](./docs/config-examples/google.md))
3031
- [Okta](https://developer.okta.com) ([Example configuration](./docs/config-examples/okta.md))

docs/config-examples/fusionauth.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# FusionAuth
2+
3+
FusionAuth does not specify a revocation endpoint so revoke functionality doesn't work. Other than that, full functionality is available.
4+
5+
* [Install FusionAuth](https://fusionauth.io/docs/v1/tech/installation-guide).
6+
* Create an application in the admin screen. Note the client id.
7+
* Set the redirect_uri for the application to be a value like `fusionauth.demo:/oauthredirect` where `fusionauth.demo` is a scheme you've registered in your application.
8+
9+
Use the following configuration (replacing the `clientId` with your application id and `fusionAuth.demo` with your scheme):
10+
11+
```js
12+
const config = {
13+
issuer: 'http://localhost:9011',
14+
clientId: '253eb7aa-687a-4bf3-b12b-26baa40eecbf',
15+
redirectUrl: 'fusionauth.demo:/callback'
16+
scopes: ['offline_access', 'openid']
17+
};
18+
19+
// Log in to get an authentication token
20+
const authState = await authorize(config);
21+
22+
// Refresh token
23+
const refreshedState = await refresh(config, {
24+
refreshToken: authState.refreshToken,
25+
});
26+
```
27+
28+
Check out a full tutorial here: https://fusionauth.io/blog/2020/08/19/securing-react-native-with-oauth

0 commit comments

Comments
 (0)