Auth0 confusion
Hello, I'm trying to setup ash auth with Auth0 I followed the tutorial but I don't understand how the "/auth" routes are created or how should I create them
9 Replies
In
router.ex
:
- Add use AshAuthentication.Phoenix.Router
to the module
- In whichever scope you use for auth, add the folliwing, e.g.
(it took me a while to wrap my head around, too š )Does this work for Auth0 though? Beacuse as far as I understand there should be a "/authorize" and a "/userinfo" as the documentation says https://ash-hq.org/docs/module/ash_authentication/3.10.6/ashauthentication-strategy-auth0
Am I missing something?
Ash HQ
Module: AshAuthentication.Strategy.Auth0
View the documentation for AshAuthentication.Strategy.Auth0 on Ash HQ.
This is the full setup I have: https://gist.github.com/dmitriid/2ae3ae7737c640e9a5de42e79bef1bfb
For
I hope this helps.
thanks man
after a little digging I found out that the strategy auth0 create some "magic" routes by itself without needing to specify them in the router so that was the poblem
No worries š It took me a while to understand how it's wired. I think that's all the modules you need
the documentation is not very clear about that
Yup, there's magic š
If I ever come around this, I should definitely do a PR against the docs
Yes I think a will make one in the future just to be more clear
thank you @dmitriid I think I'm gonna "steal" some of your code ahahaha
š
Of course š