Hi there,
I have an Elm frontend app, performing user login and token creation with Auth0 Lock, and then performing requests to a Phoenix API on the backend, passing the JWT token from Elm to Phoenix in an "Authorization: Bearer " header.
I want the Phoenix API to be able to verify the supplied token in order to auth the request from the client app.
I’m currently using Guardian(https://hexdocs.pm/guardian/api-reference.html), configured along these lines:
https://github.com/ueberauth/guardian/issues/211
I’m new to Phoenix.
I can’t get past ‘plug Guardian.Plug.EnsureAuthenticated’.
I’m not sure how to debug/inspect router/pipeline.
Ideally, I’d like Guardian.Plug.EnsureAuthenticated to reside in the pipeline, rather than in each controller.
Am I correct in assuming that Guardian will actually verify the supplied token with Auth0?
Because there doesn’t seem to be any provision in the config for the Auth0 ‘client_id’, which I expect would be necessary.