From 95c962ef5a21fba6644d2058229f29295fc94c31 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Fri, 3 Apr 2020 15:25:18 +0100 Subject: [PATCH] update instructions in readme to use login_url/1 #44 --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 25e1473..4543183 100644 --- a/README.md +++ b/README.md @@ -289,11 +289,15 @@ end To: ```elixir def index(conn, _params) do - oauth_github_url = ElixirAuthGithub.login_url_with_scope(["user:email"]) + oauth_github_url = ElixirAuthGithub.login_url(%{scopes: ["user:email"]}) render(conn, "index.html", [oauth_github_url: oauth_github_url]) end ``` +Example: +[`lib/app_web/controllers/page_controller.ex#L4-L7`](https://github.com/dwyl/elixir-auth-github-demo/blob/5e564729ec839379697761d9b72cddf413f8eb0e/lib/app_web/controllers/page_controller.ex#L4-L7) + + ### 5.1 Update the `page/index.html.eex` Template Open the `/lib/app_web/templates/page/index.html.eex` file