edgurgel/verk_web

Mount verk_web under protected scope instead of basic auth?

Opened this issue · 3 comments

Hi! Love Verk. Question. Is there a way to mount the verk route under a protected scope as opposed to using basic auth? We use pow to protect routes and would like to put the /verk route under an authenticated scope instead if basic auth.

something like:

  scope "/",  do
    pipe_through [:browser, :protected]
    
    forward("/verk", VerkWeb.MountRoute)
  end

Hey @mitcheaton1, I think you can achieve this by ensuring that authorization not defined at all:

auth_options = Application.get_env(:verk_web, :authorization)
if auth_options do
plug(BasicAuth, use_config: {:verk_web, :authorization})
end

TBH we should probably revisit this now that Phoenix seems to handle mounting external endpoints more easily 🤔

Is this still in progress? Or you guys want help?

Hi @aleDsz, no progress from my side. If you want to move this forward feel free to work on it 👍