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

feat(oidc-auth): support absolute path for redirect URI #926

Merged

Conversation

hnw
Copy link
Contributor

@hnw hnw commented Jan 7, 2025

Summary

The OIDC_REDIRECT_URI was initially expected to be a full URL, but rewriting the URL for development and production environments is cumbersome. By supporting absolute paths such as /callback, we aim to reduce the developer’s effort.

Changes

  • Added support for absolute paths in OIDC_REDIRECT_URI and set the default value to /callback.

Testing

  • Verified the behavior when OIDC_REDIRECT_URI is a relative path and when it is not set.
  • Added tests for other environment variables.

Tasks

  • Add tests
  • Run tests
  • yarn changeset at the top of this repo and push the changeset
  • Follow the contribution guide

Copy link

changeset-bot bot commented Jan 7, 2025

🦋 Changeset detected

Latest commit: 9163976

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hono/oidc-auth Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@yusukebe
Copy link
Member

yusukebe commented Jan 8, 2025

@hnw Thanks! This is a good feature!

Hey @maemaemae3! Can you review this?

@maemaemae3
Copy link
Contributor

looks super useful feature, I will use it once it's released, thank you!
LGTM!

packages/oidc-auth/src/index.ts Outdated Show resolved Hide resolved
packages/oidc-auth/src/index.ts Outdated Show resolved Hide resolved
packages/oidc-auth/src/index.ts Outdated Show resolved Hide resolved
hnw and others added 2 commits January 9, 2025 00:19
Change variable names to camelCase

Co-authored-by: tempepe <maekawa@tempepe.com>
Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

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

LGTM!

@yusukebe
Copy link
Member

yusukebe commented Jan 9, 2025

@maemaemae3 Thank you for the review!

@hnw Looks good! Let's go with this. Merging and releasing a new version. Thank you!

@yusukebe yusukebe merged commit 2f716d6 into honojs:main Jan 9, 2025
1 check passed
@github-actions github-actions bot mentioned this pull request Jan 9, 2025
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.

3 participants