-
Notifications
You must be signed in to change notification settings - Fork 41
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
Why did I have to create /views/googe_auth_new + templates/google_auth/welcome ? #63
Comments
@ndrean dis you follow the example: https://github.com/dwyl/elixir-auth-google-demo ? 🤞 |
nope ....! also (5.1) Little details you cannot invent. |
yes, the page is enough. |
So I understand that if you don't use
defmodule AppWeb.GoogleAuthController do
use AppWeb, :controller
def index(conn, %{"code" => code}) do
{:ok, token} = ElixirAuthGoogle.get_token(code, conn)
{:ok, profile} = ElixirAuthGoogle.get_user_profile(token.access_token)
conn
|> put_view(AppWeb.PageView) <---------
|> render(:welcome, profile: profile)
end
end 6.1 Update the page/index.html.heex Template. <----- "heex" <section class="phx-hero">
<h1>Welcome to Awesome App!</h1>
<p>To get started, login to your Google Account: <p>
<a href={@oauth_google_url} > <----------------------
<img src="https://i.imgur.com/Kagbzkq.png" alt="Sign in with Google" />
</a>
</section> |
Tried to follow the guide but I had to create the files above. Did I do something wrong as you don't seem to need this.
The text was updated successfully, but these errors were encountered: