docs: Clarify starting position 🏎️ (#441)

docs: Match the identity from the AshAuthenticationPhoenix guide 
This commit is contained in:
De Wet Blomerus 2023-09-28 10:26:42 -04:00 committed by GitHub
parent 16619f2172
commit 04a773ec27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,10 @@
This is a _very quick_ tutorial on how to configure your application to use
Auth0 for authentication.
First, you need to configure an application in [the Auth0
Before you start this tutorial, skip the Token resource while following the
[AshAuthenticationPhoenix guide](https://hexdocs.pm/ash_authentication_phoenix/getting-started-with-ash-authentication-phoenix.html))
Next, you need to configure an application in [the Auth0
dashboard](https://manage.auth0.com/) using the following steps:
1. Click "Create Application".
@ -30,8 +33,7 @@ dashboard](https://manage.auth0.com/) using the following steps:
7. Set "Allowed Web Origins" to your application's base URL.
8. Click "Save Changes".
Next we can configure our resource (assuming you already have everything else
set up):
Next we can configure our resource:
```elixir
defmodule MyApp.Accounts.User do
@ -117,7 +119,7 @@ defmodule MyApp.Accounts.User do
argument :user_info, :map, allow_nil?: false
argument :oauth_tokens, :map, allow_nil?: false
upsert? true
upsert_identity :email
upsert_identity :unique_email
# Required if you have token generation enabled.
change AshAuthentication.GenerateTokenChange