Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Claims] Add act to claims #61

Merged

Conversation

kageiit
Copy link
Contributor

@kageiit kageiit commented Aug 2, 2024

Updated act to reflect the documentation

Copy link
Owner

@DarrenBaldwin07 DarrenBaldwin07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this is odd. When decoding a session token for cloud.tembo.io (for example) the payload looks like this:

{
  "azp": "https://cloud.tembo.io",
  "exp": 1722819750,
  "iat": 1722733350,
  "iss": "https://clerk.tembo.io",
  "jti": "575bd5797db3da1dc5b9",
  "nbf": 1722733345,
  "org_id": "org_2jyEOHrzo8RWGERumZ61dghllsP",
  "org_role": "admin",
  "org_slug": "darrenbaldwin1",
...
}

So it does not seem like they should be nested like this PR. I have seen issues in the past where the session token claims are different based on when you created you app in Clerk

@kageiit
Copy link
Contributor Author

kageiit commented Aug 4, 2024

Let me get in touch with clerk support and revisit this.

It's odd that we are seeing different claims

If it's due to some legacy behavior,

I can add some logic to deaerialzie from whichever exists in the payload

@DarrenBaldwin07
Copy link
Owner

Let me get in touch with clerk support and revisit this.

It's odd that we are seeing different claims

If it's due to some legacy behavior,

I can add some logic to deaerialzie from whichever exists in the payload

I pinged my contact at Clerk too - will let ya know what I hear

@kageiit
Copy link
Contributor Author

kageiit commented Aug 8, 2024

We double checked. the fields are nested at the right level on main branch. We had a custom jwt template that casued some confusion.

Ill update the PR to just do the actor change

@kageiit kageiit changed the title [Claims] Use the right serde nesting level for org and act [Claims] Add act to claims Aug 8, 2024
@DarrenBaldwin07 DarrenBaldwin07 merged commit a14a5ec into DarrenBaldwin07:main Aug 19, 2024
1 check passed
@kageiit kageiit deleted the deserialize_claims_correctly branch August 19, 2024 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants