Error when login with admin email
The seeds file create an admin user from the ADMIN_EMAIL environment variable:
https://github.com/dwyl/auth/blob/3a9d68720c02d2a8bdec33ffd8b70c35a4e5289a/priv/repo/seeds.exs#L20-L28
When login with this email using email/password the user is retreived from the database and the welcome page is displayed: https://github.com/dwyl/auth/blob/3a9d68720c02d2a8bdec33ffd8b70c35a4e5289a/lib/auth_web/controllers/auth_controller.ex#L254-L261
However when the user was created with the seed, the value auth_provider is nil which then create an error on the following line:
https://github.com/dwyl/auth/blob/main/lib/auth_web/templates/auth/welcome.html.eex#L7
I think we can add the value email for auth_provider for the admin
@SimonLab when are you seeing this error? on your localhost? 💭
Yes it's on localhost. It's not a big issue and I think as soon as the admin user authenticate with either Google or Github the auth_provider value is updated (need to double check this)
Yeah, I never login using email and password (as admin) on localhost. So this is an interesting issue. 💭