sergiodxa / sergiodxa/remix-auth-github

redirectURI without the domain?

Open
#50 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
92
Forks
15
Avg merge
1m
Merged PRs (30d)
4

Description

Right now I have to do this:

return new GitHubStrategy(
	{
		clientId: process.env.GITHUB_CLIENT_ID,
		clientSecret: process.env.GITHUB_CLIENT_SECRET,
		redirectURI: 'https://www.epicstack.dev/auth/github/callback',
	},
	async () => {
		// ...
	}
)

But I want to be able to do this:

return new GitHubStrategy(
	{
		clientId: process.env.GITHUB_CLIENT_ID,
		clientSecret: process.env.GITHUB_CLIENT_SECRET,
		redirectURI: '/auth/github/callback',
	},
	async () => {
		// ...
	}
)

And then the strategy would get the domain from the request.

This would make it so we can run this locally and on staging. Additionally with this improvement people wouldn't have to change this hard-coded URL when creating an epic app.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the GitHubStrategy entry point and trace how redirectURI is used when handling the request and constructing the OAuth callback URL. Confirm that a path-only redirectURI can use the request domain while preserving the existing absolute-URL behavior; no specific files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, typescript
Domain
authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.