Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding FusionAuth integration guide #994

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions app/README-FusionAuth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Using AppAuth with [FusionAuth](https://fusionauth.io)

[FusionAuth](https://fusionauth.io) is a customer authentication and authorization platform built by developers, for developers. It can be easily integrated to your AppAuth Android app with very few touches:

1. Install FusionAuth on your [Cloud](https://fusionauth.io/docs/v1/tech/installation-guide/cloud), using [Docker](https://fusionauth.io/docs/v1/tech/installation-guide/docker), or check [other options available](https://fusionauth.io/docs/v1/tech/installation-guide/)
2. [Expose the local instance to Internet](https://fusionauth.io/docs/v1/tech/developer-guide/exposing-instance) and copy the address ngrok gave you
3. Log into the admin UI using the ngrok address
4. Browse to `Tenants` and click on the blue pencil icon to edit the **Default** tenant
* In the `Issuer` field, paste the address you copied earlier
* Save the tenant
5. Navigate to the `Applications` page, click on the green plus icon to create one
* Give it a meaningful `Name` (e.g. `My Android App`)
* Select the `OAuth` tab and fill in these fields:
* `Client Authentication`: *Not required when using PKCE*
* `PKCE`: *Required*
* `Authorized redirect URLs`: your app redirect URI (e.g. `net.openid.appauthdemo:/oauth2redirect`)
* Go to the `JWT` tab
* Click on the `Enabled` switch
* Set both `Access token signing key` and `Id token signing key` to *Auto generate a new key on save...* to generate a new pair of asymmetric keys using the RS256 algorithm
* Save the application
6. After being redirected back to the `Applications` page, click on the green magnifying glass for the created application to view its details
* Scroll down to `OAuth2 & OpenID Connect Integration details` and copy the `OpenID Connect Discovery` address
* In the `OAuth configuration` section, copy the `Client Id` for the newly created application
7. In your Android app, edit `app/res/raw/auth_config.json` and paste the values you copied into lines 2 and 6:
```json
{
"client_id": "THE CLIENT ID YOU COPIED FROM FUSIONAUTH",
"redirect_uri": "net.openid.appauthdemo:/oauth2redirect",
"end_session_redirect_uri": "net.openid.appauthdemo:/oauth2redirect",
"authorization_scope": "openid offline_access",
"discovery_uri": "THE OPENID CONNECT DISCOVERY ADDRESS YOU COPIED FROM FUSIONAUTH",
"https_required": true
}
```
3 changes: 2 additions & 1 deletion app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ Each identity provider is free to submit a set of instructions for configuring t
interact with their authorization endpoints. Those who have submitted instructions are listed
below:

- [FusionAuth](README-FusionAuth.md)
- [Gluu](README-Gluu.md)
- [Google](README-Google.md)
- [Okta](README-Okta.md)
- [Gluu](README-Gluu.md)

## Should I use this same configuration pattern in my own apps?

Expand Down