jmreyes / passport-google-id-token

Google ID token authentication strategy for Passport and Node.js.
MIT License
44 stars 22 forks source link

Support multiple client IDs #13

Closed toddmedema closed 7 years ago

toddmedema commented 7 years ago

Can pass in an array (or single ID as string) of IDs, it'll check against all of them before declaring invalid.

Useful for cases where many types of apps / clients are auth'ing against the same server

seonixx commented 7 years ago

@jmreyes keen to get this merged. Thoughts?

jmreyes commented 7 years ago

Hi, this feature should be already supported in the current version, could you please check it out? I've written some tests for this (branch clientid-array) and it seems to be the case.

Basically the jsonwebtoken library used to verify the token already accepts an array of clientIDs as audience, and is able to check whether one of those supplied matches the one in the token.