Skip to content

Conversation

nullfunc
Copy link

@nullfunc nullfunc commented Sep 8, 2025

Add support for grant-type assertions of jwts. jwk verifications is done but the custom success() handler does custom validation before access and refresh tokens are generated.

@nullfunc nullfunc changed the title add gitlab and github actions oidc add grant-type assertions for jwt-bearer Sep 8, 2025
Copy link
Member

@lionello lionello left a comment

Choose a reason for hiding this comment

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

I left some suggestions.

const json = (await tokens.json()) as any
if (!tokens.ok) {
return {
err: new InvalidJWTError(),
Copy link
Member

Choose a reason for hiding this comment

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

InvalidJWTError is a bit too specific. Lots of other reasons why this could fail.

@@ -173,7 +173,7 @@ export function CodeProvider<
const action = fd.get("action")?.toString()

if (action === "request" || action === "resend") {
const claims = Object.fromEntries(fd) as Claims
const claims = Object.fromEntries(fd.entries()) as Claims
Copy link
Member

Choose a reason for hiding this comment

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

when I see fromX(something.toX()) I wonder if it's a no-op and there's a more direct way to get what we need.

@@ -7,7 +7,8 @@
"module": "NodeNext",
"moduleResolution": "NodeNext",
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
"jsxImportSource": "hono/jsx",
"types": ["node", "bun"]
Copy link
Member

Choose a reason for hiding this comment

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

Sus: it's either node or bun, not both.

@nullfunc nullfunc requested a review from lionello September 9, 2025 22:11
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