nhosoya / omniauth-apple

OmniAuth strategy for Sign In with Apple
MIT License
261 stars 99 forks source link

include 'name' in `info` hash as that is required field of omniauth #38

Closed btalbot closed 4 years ago

btalbot commented 4 years ago

include 'name' in info hash as that is required field of omniauth schema. minor refactor of extra hash contents.

Also prune out keys with null (or empty) values as most other omniauth providers do and seems to be a good practice. For 'extra' hash, split details into their own hash for 'id_info' and 'user_info' so it's clear where the values come from and common keys do not clobber each other. Add raw 'id_token' to extra as well as it's sometimes useful for troubleshooting and is added by other providers.

btalbot commented 4 years ago

OmniAuth schema https://github.com/omniauth/omniauth/wiki/Auth-Hash-Schema#schema-10-and-later