Reputation: 179
Upon signup auth0 automatically sends email verification, but what I am trying to implement is, add Resend Email Verification button on frontend application, which will request auth0 to resend verification email (in case the user loses the previous email verification email).
I figured out that, I need to call this API in Auth0 Management API, which needs a scope update:users, but the accessToken I got from auth0 only has openid, users and email scope.
So the question is
If not what might be the best approach?
Upvotes: 0
Views: 626
Reputation: 668
I am posting my response from the auth0 community forum here for the visibility of future users. Thanks for the follow up Robin!
You don’t want to give front end application tokens with general scopes for the management API. If you let that user have a token to update:users, then they will be able to update any user in your DB.
You will want to make that request from a trusted application like a backend. A M2M application would work in this case. You can then make a client credentials grant request with client secret and get a token to interact with the management api.
Upvotes: 3