Skip to content

Commit

Permalink
Merge pull request FormidableLabs#557 from FusionAuth/main
Browse files Browse the repository at this point in the history
Add FusionAuth configuration
  • Loading branch information
Kadi Kraman authored Aug 20, 2020
2 parents f4c304b + 2d496a8 commit a99229d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ These providers are OpenID compliant, which means you can use [autodiscovery](ht

- [Identity Server4](https://demo.identityserver.io/) ([Example configuration](./docs/config-examples/identity-server-4.md))
- [Identity Server3](https://github.com/IdentityServer/IdentityServer3.md) ([Example configuration](./docs/config-examples/identity-server-3.md))
- [FusionAuth](https://fusionauth.io) ([Example configuration](./docs/config-examples/fusionauth.md))
- [Google](https://developers.google.com/identity/protocols/OAuth2)
([Example configuration](./docs/config-examples/google.md))
- [Okta](https://developer.okta.com) ([Example configuration](./docs/config-examples/okta.md))
Expand Down
28 changes: 28 additions & 0 deletions docs/config-examples/fusionauth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# FusionAuth

FusionAuth does not specify a revocation endpoint so revoke functionality doesn't work. Other than that, full functionality is available.

* [Install FusionAuth](https://fusionauth.io/docs/v1/tech/installation-guide).
* Create an application in the admin screen. Note the client id.
* 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.

Use the following configuration (replacing the `clientId` with your application id and `fusionAuth.demo` with your scheme):

```js
const config = {
issuer: 'http://localhost:9011',
clientId: '253eb7aa-687a-4bf3-b12b-26baa40eecbf',
redirectUrl: 'fusionauth.demo:/callback'
scopes: ['offline_access', 'openid']
};

// Log in to get an authentication token
const authState = await authorize(config);

// Refresh token
const refreshedState = await refresh(config, {
refreshToken: authState.refreshToken,
});
```

Check out a full tutorial here: https://fusionauth.io/blog/2020/08/19/securing-react-native-with-oauth

0 comments on commit a99229d

Please sign in to comment.