5

I'm trying to use Google as an IDP for my application by federation.

For user authentication part i'm using openID connect flow.

Following steps have been done already.

  • Created a Google application
  • Got client ID and client secret
  • Configured Google federation in my application (Login with google)
  • Authentication flow is successfully working
  • Token retrieved successfully

The problem is I want to add user roles to the user that already registered in google and fetch the user roles as a claim in token that is retrieve from the google.

Basically I want do add role based authentication to the application based on user roles.

So how to create and assign user roles to Google user, and how to fetch them as a claim in JWT token?

0 Answers0