auth0 / Guardian.swift

Swift toolkit for Auth0 Guardian API
https://auth0.com/guardian
MIT License
9 stars 19 forks source link

Enrollment: add user_id property #38

Closed nikolaseu closed 7 years ago

nikolaseu commented 7 years ago

This property allows to check which auth0 user this enrollment corresponds to.

Assuming the SDK is just used to add an extra feature to an app that has some functionality of its own (that is probably already using lock -or similar-), this allows to check that the 2nd factor matches the logged in user (the app should probably keep the user logged in with a refresh token).

Or also in case the app allows multiple logged in users, this lets you know when to show a "add/delete 2nd factor" on each user's "profile view", or know which enrollment to use to get a OTP code for an specific user.