Skip to content

Conversation

@sebastienhoorens
Copy link
Contributor

@sebastienhoorens sebastienhoorens commented Nov 3, 2025

Screenshot 2025-11-03 at 16 20 42 Screenshot 2025-11-03 at 17 33 43

Changelog

Added

  • [TAN-5763] Admin HQ data tool to get JWT token

@notion-workspace
Copy link

@cl-dev-bot
Copy link
Collaborator

cl-dev-bot commented Nov 3, 2025

Messages
📖 Changelog provided 🎉
📖 Notion issue: TAN-57630
📖 Notion issue: TAN-5763
📖

Run the e2e tests

📖 Check translation progress

Generated by 🚫 dangerJS against 2ae07ad

jwt_token = json_parse(response_body)[:jwt_token]

# Test JWT structure (payloads starting with "{" will always start with "eyJ" when encoded)
expect(jwt_token).to match(/\AeyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\z/)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regex generated with Copilot.

user.save!
end

def jwt_token(user)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe rename this method (&/or add a comment) to make it clear what the use case is, as I expect other devs would get confused about which JWT token in used in the the 'regular' requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, for some reason I thought this was a separate service within the admin API engine, but seems like I didn't see that right. I'll rename it or move it somewhere else. Or add a comment indeed.

Copy link
Contributor

@jinjagit jinjagit left a comment

Choose a reason for hiding this comment

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

Just a suggestion to disambiuguate the new jwt token generation method from the existing one(s)

@sebastienhoorens sebastienhoorens changed the title TAN-5673 JWT token data tool TAN-5763 JWT token data tool Nov 5, 2025
@notion-workspace
Copy link

@sebastienhoorens sebastienhoorens merged commit 61c9ffc into master Nov 7, 2025
9 checks passed
@sebastienhoorens sebastienhoorens deleted the TAN-57630-jwt-data-tool branch November 7, 2025 10:15
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.

4 participants