Skip to content
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
9 changes: 4 additions & 5 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export MICROSOFT_CLIENT_SECRET=rDq8Q~.uc-237FryAt-lGu7G1sQkKR
export MICROSOFT_CLIENT_ID=a3d22eeb-85aa-4650-8ee8-3383931
```

> ⚠️ Don't worry, these keys aren't valid.
> ⚠️ Don't worry, these values aren't valid.
They are just here for illustration purposes.

## 3. Create 2 New Files ➕
Expand All @@ -135,7 +135,7 @@ defmodule AppWeb.MicrosoftAuthController do
use AppWeb, :controller

@doc """
`index/2` handles the callback from Google Auth API redirect.
`index/2` handles the callback from Microsoft Auth API redirect.
"""
def index(conn, %{"code" => code, "state" => state}) do

Expand Down Expand Up @@ -444,9 +444,8 @@ Open the file and add the following function:
def logout(conn, _params) do

# Clears token from user session
conn = conn |> delete_session(:token)

conn
|> delete_session(:token)
|> redirect(to: "/")
end
```
Expand All @@ -466,7 +465,7 @@ Inside `lib/app_web/templates/page/welcome.html.heex`,
add the button.

```html
<a href={@logout_microsoft_url}>
<a href="<%= @logout_microsoft_url %>">
<button type="button" class="rounded-md bg-indigo-50 px-3.5 py-2.5 text-sm font-semibold text-indigo-600 shadow-sm hover:bg-indigo-100">Sign Out</button>
</a>
```
Expand Down
Loading