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

added window instructions for auth.md #262

Merged
merged 2 commits into from
Oct 16, 2024
Merged
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
33 changes: 31 additions & 2 deletions auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,36 @@ Then run:
source .env
```

This will make the `AUTH_API_KEY` environment variable available.
This will make the `AUTH_API_KEY` environment variable
available.

<br>

### **If** you are using windows, please note you'll have to use the following steps:
> _**Note**: if you know a better way, let us know!_

Save your `AUTH_API_KEY` from the Auth App somewhere in your
project directory that can be easily found.
> (we will be copying and pasting this into our command
> prompt).

Please ensure this is still in .gitignore file still!

Next, if you have you phx.server running, close / abort
it (`ctrl c` then `a` then `y` in terminal / cmd).

Now, in **command promt** in our project directory we're
going to set the environment variable manually with:

```set AUTH_API_KEY=<YOUR_KEY>```

where `<YOUR_KEY>` is the `API KEY` we just saved from
the Auth App.

Once you make the following changes in the remaing sections,
launch `mix phx.server` from the **same** command prompt
where we just set the `AUTH_API_KEY` environment variable
so our application will have access to it.

## 3. Create the _Optional_ Auth Pipeline in `router.ex`

Expand Down Expand Up @@ -374,4 +403,4 @@ It should look like this.
![auth_demo](https://user-images.githubusercontent.com/17494745/216612794-9064f4a5-2a31-4068-b82d-4d8ad45d6e3c.gif)


[![HitCount](https://hits.dwyl.com/dwyl/phoenix-chat-example-auth.svg)](https://github.com/dwyl/phoenix-chat-example)
[![HitCount](https://hits.dwyl.com/dwyl/phoenix-chat-example-auth.svg)](https://github.com/dwyl/phoenix-chat-example)
Loading