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

Serving an alternate handleCallback() redirect w/ cookies #307

Open
liamtsang opened this issue Feb 22, 2024 · 2 comments
Open

Serving an alternate handleCallback() redirect w/ cookies #307

liamtsang opened this issue Feb 22, 2024 · 2 comments

Comments

@liamtsang
Copy link

Hello I am using deno_kv_oauth for my application and am trying to do the following:

I want users to a have an internal uid that is the same format between oauth providers.

Here is the logic flow I want to create:

User signs in via oauth ->
Redirected to callback page ->
if an existing user -> redirect to homepage
if not an existing user -> create a new internal user KV / id <- problem!

I can't seem to find a way to figure out how to return a different redirect and save the cookies.

(also I am using Hono but I do not think that is the problem?)

@iuioiua
Copy link
Contributor

iuioiua commented Feb 23, 2024

I'm going away for ~1 week. Please let me think about this and get back to you 🙂

@liamtsang
Copy link
Author

FWIW I hacked together a way to do this by adding cookies and a conditional redirect on "/" . But I think this would be a nice feature to add either way

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

No branches or pull requests

2 participants