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

any way to restrict login to external provider only? #185

Open
mus0u opened this issue Jun 2, 2020 · 2 comments
Open

any way to restrict login to external provider only? #185

mus0u opened this issue Jun 2, 2020 · 2 comments

Comments

@mus0u
Copy link

mus0u commented Jun 2, 2020

i have successfully set up the auth0 provider and am able to log in with it, but i don't want to let users be able to auth against the local DB, only the auth0 one. it appears that removing pow_session_routes() from the router seems to break pow_assent, however. is there a correct way to accomplish this?

@wodow
Copy link

wodow commented Jul 1, 2020

Hack alert: I've found that replacing pow_routes() with its sub-macro pow_session_routes() prevents registration using the default Pow route (though /session/new will 50x) whilst not affecting Pow Assent.

@jbosse
Copy link

jbosse commented Jul 27, 2020

@wodow Double Hack alert: if you hijack the /session/new route before defining the pow_sesssion_routes you can "redirect" session/new to a different action:

scope "/" do
  pipe_through(:browser)

  # Hack Alert
  get("/session/new", MyAppWeb.PageController, :index)
  # 
  pow_session_routes()
  pow_assent_routes()
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants