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 oauth proxy edge function #88

Merged
merged 7 commits into from
Jul 27, 2023
Merged

Add oauth proxy edge function #88

merged 7 commits into from
Jul 27, 2023

Conversation

jackkleeman
Copy link
Contributor

@jackkleeman jackkleeman commented Jul 26, 2023

Instead of using Netlify Identity auth, which seems quite expensive and not that trivial to set up, we can just use an edge function to send people through a github redirect flow, get their github token, check they have access to this repo, and then issue a jwt with 1 week expiry

To test it out:
Go to https://deploy-preview-88--docsrestatedev.netlify.app/
Enter the password wev0puh2ufe@UMJ6ncd - we need this until this is merged, as we don't have the function set up on prod yet
Then you should go through a github redirect flow and come back to whatever page you first landed on

Fixes #85

@netlify
Copy link

netlify bot commented Jul 26, 2023

Deploy Preview for docsrestatedev ready!

Name Link
🔨 Latest commit 2f934a5
🔍 Latest deploy log https://app.netlify.com/sites/docsrestatedev/deploys/64c1442ea6fac5000806ef07
😎 Deploy Preview https://deploy-preview-88--docsrestatedev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jackkleeman jackkleeman changed the title [wip] Add oauth proxy edge function Add oauth proxy edge function Jul 26, 2023
Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Nicely done @jackkleeman. Really cool that we now have authorization for our documentation! +1 for merging.

@jackkleeman jackkleeman merged commit c1fca53 into main Jul 27, 2023
5 checks passed
@jackkleeman jackkleeman deleted the edge-auth branch July 27, 2023 08:00
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.

Github authentication for docs
2 participants