• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

Get user.data Object Using oAuth Token

Scheduled Pinned Locked Moved Solved
Q&A
1
2
904
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    mark.robustelli
    last edited by 28 Jun 2023, 02:19

    How do I get all of the data from the user.data object using the oAuth token directly in my application?

    M 1 Reply Last reply 28 Jun 2023, 02:20 Reply Quote 0
    • M
      mark.robustelli @mark.robustelli
      last edited by 28 Jun 2023, 02:20

      Depending upon your use case, there are a few ways to get at that data.

      • You can use a JWT Populate lambda to add additional claims to the JWT from values stored inside user.data. You can then access these claims in the JWT after you validated it decode it yourself. Or, if you use the FusionAuth UserInfo endpoint, we will return the claims in a JSON response after we validate the token.

      *Keep in the JWT Populate lamda you can add whateve you want. Any custom claims added to the JWT will then be returned by the UserInfo endpoint. In most cases it is better to keep the JWT small.

      • You can use the OAuth2 access token (JWT) to retrieve the user with the User API. This will return the entire user object include anything stored in user.data. This is done by making a GET request to the User API and providing the token in the Authorization header Authorization: Bearer <encoded JWT>
      1 Reply Last reply Reply Quote 0
      • M mark.robustelli has marked this topic as solved on 28 Jun 2023, 02:20
      1 out of 2
      • First post
        1/2
        Last post