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

Clarify documentation around google auth #331

Merged
merged 3 commits into from
Mar 7, 2019
Merged
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
Binary file added assets/e-mission-both/google_auth_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions docs/e-mission-both/configuring_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,24 @@ If you want to use a more full-featured authentication server, you could conside

### `google_auth`/`google-authutil` ###

This option uses JWTs using the google identity solution. The JWTs are decrypted using google's public keys and decoded using the `google-auth` library.
This option uses JWTs using the google identity solution with [cross-client authentication](https://developers.google.com/identity/protocols/CrossClientAuth#accessTokens). The JWTs are decrypted using google's public keys and decoded using the `google-auth` library.

- If you are deploying a new UI on the existing e-mission app, you need to ask me to generate google client keys.
- If you are deploying your own app, register your app in the google developer console and generate your own client keys.

#### Configuration ####

android and iOS keys from https://console.developers.google.com. Note that for android, we use the webserver key. And for iOS, the key needs to be encoded into the native app as a URL type.
- create `android`, `ios` and `web application` credentials in the same project at https://console.developers.google.com
- use the `web application` key for android
- use the `ios` key for iOS, but encoded into the native app as a URL type
- the `android` key is not used directly, but is required to be in the project to allow the android authentication to proceed

![Google Auth Screenshot](../../assets/e-mission-both/google_auth_screenshot.png)

If you have just created a set of keys, you can just duplicate them to make the old and new keys - e.g. in `conf/net/auth/google_auth.json`



```
"client_key_old" : "11111111111-aaaaaaaaaaaaaaaa.apps.googleusercontent.com",
"client_key" : "11111111111-aaaaaaaaaaaaaaaa.apps.googleusercontent.com",
Expand Down