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

Add low-level auth lib + nextjs integration #750

Merged
merged 14 commits into from
Nov 8, 2023
Merged

Add low-level auth lib + nextjs integration #750

merged 14 commits into from
Nov 8, 2023

Conversation

jaclarke
Copy link
Member

No description provided.

Copy link
Collaborator

@scotttrinh scotttrinh left a comment

Choose a reason for hiding this comment

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

A few piece of minor feedback, and one thing we ought to change now: hex -> base64url.

packages/auth/src/core.ts Outdated Show resolved Hide resolved
packages/auth/src/core.ts Outdated Show resolved Hide resolved
packages/auth/src/core.ts Outdated Show resolved Hide resolved
packages/auth-core/src/pkce.ts Outdated Show resolved Hide resolved
@jaclarke jaclarke changed the title Add low-level auth lib Add low-level auth lib + nextjs integration Nov 6, 2023
Copy link
Collaborator

@scotttrinh scotttrinh left a comment

Choose a reason for hiding this comment

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

New changes look good!

@jaclarke jaclarke marked this pull request as ready for review November 7, 2023 12:38
@jaclarke jaclarke merged commit 32877ff into master Nov 8, 2023
10 checks passed
@jaclarke jaclarke deleted the auth branch November 8, 2023 12:24
const [host, port] = connectConfig.address;
const baseUrl = `${
connectConfig.tlsSecurity === "insecure" ? "http" : "https"
}://${host}:${port}/db/${connectConfig.database}/ext/auth`;
Copy link
Contributor

Choose a reason for hiding this comment

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

@jaclarke There is missing slash /

new URL("foo", "http://localhost:3000/auth").toString()
// 'http://localhost:3000/foo'
new URL("foo", "http://localhost:3000/auth/").toString()
// 'http://localhost:3000/auth/foo'

This causes wrong builtin urls to be created (beside other)

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, you're right. Thanks for catching that.

@jaclarke jaclarke mentioned this pull request Nov 8, 2023
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