dwyl / auth-mvp

:key: Prototype Authentication Service
https://auth-mvp.herokuapp.com/
4 stars 0 forks source link

Save profile image #23

Open SimonLab opened 4 years ago

SimonLab commented 4 years ago

Google and Github Oauth2 allow us to get basic information about the user. We are currently only saving in our Postgres person database the email of the user: https://github.com/dwyl/auth-mvp/blob/35799662801eaf1094d54797f00927aaccb3cc8b/lib/auth_mvp/people/person.ex#L8-L14

We want now to be able to save the profile image of the user. With Google the image url is already returned via ElixirAuthGoogle package under the picture value: https://github.com/dwyl/auth-mvp/blob/35799662801eaf1094d54797f00927aaccb3cc8b/lib/auth_mvp_web/controllers/google_auth_controller.ex#L9

With Github the value to get will be saved under avatar_url