Skip to content

Commit

Permalink
add link to github.com/dwyl/learn-environment-variables for #10 #13
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Nov 28, 2019
1 parent 8cff686 commit 9ca2797
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions create-google-app-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ the details of your App for the credentials.

+ Application Type: Web application
+ Name: Elixir Auth Server
+ Authorized JavaScript origins: http://localhost:4000
(_the default for a Phoenix app on your local dev machine_)
+ Authorized redirect URIs: http://localhost:4000/auth/google/callback
(_the endpoint to redirect to once authentication is successful_)
+ Authorized JavaScript origins:
http://localhost:4000
(_the default for a Phoenix app on your local dev machine.
you can add your "production" URL later._)
+ Authorized redirect URIs:
http://localhost:4000/auth/google/callback
(_the endpoint to redirect to once authentication is successful.
again, add your production URL once you have auth working on `localhost`_)

> Ensure you hit the enter key after pasting/typing
the URIs to ensure they are saved.
Expand All @@ -96,12 +100,6 @@ server and client implementations.
For now just create the server (Elixir) credentials.


<!--
![elixir-auth-demo-enable-apis](https://user-images.githubusercontent.com/194400/69723299-24ef4c00-1111-11ea-8fb2-908c220d5d0c.png)
Click the **+ ENABLE APIS AND SERVICES** button.
-->

## 5. Download the OAuth Client Credentials

After you click the **Create** button
Expand Down Expand Up @@ -156,11 +154,22 @@ But this is what the file looks like.
## 6. Save the Credentials in your `.env` File

Once you have the credentials for your OAuth Client,
add them to your **`.env`** (_environment variables_) file.
export them as **environment variables**
so that your Elixir/Phoenix app can access them.

> If you are new to environment variables,
please see:
[github.com/dwyl/learn-environment-variables](https://github.com/dwyl/learn-environment-variables)

In our case we add the credentials
to an **`.env`** (_environment variables_) file.

e.g:

```
```yml
export GOOGLE_CLIENT_ID=631770888008-6n0oruvsm16kbkqg6u76p5cv5kfkcekt.apps.googleusercontent.com
export GOOGLE_CLIENT_SECRET=MHxv6-RGF5nheXnxh1b0LNDq
```

Return to step 3 of the
[README.md](https://github.com/dwyl/elixir-auth-google/blob/master/create-google-app-guide.md)

0 comments on commit 9ca2797

Please sign in to comment.