Code Monkey home page Code Monkey logo

Comments (4)

conwnet avatar conwnet commented on August 11, 2024 1

The whole auth process is referred to GitHub Authorizing OAuth Apps Documentation.

The detailed steps for authenticating GitHub1s to GitHub:

  1. User Click on 'Connect to GitHub' button in github1s auth page.
  2. GitHub1s runs a custom command which is implemented here. As you see, it will open the GitHub OAuth Page (https://github.com/login/oauth/authorize?scope=repo,user:email&client_id=${client_id}) in a new window (notice the client_id is provided by GitHub when you register an OAuth App), then open a message listener to wait the OAuth token that send back in Step 4.
  3. Once User agrees to the OAuth request, GitHub will redirect to the Authorization callback URL which was filled in when you registered for the OAuth app, and provide a temporary code in url search parameters.
  4. The implementation of the Authorization callback URL is here, it is a Serverless Function that deployed in Vercel. it will use the code (received in Step 3), client_id (obtained when registering) and client_secret (obtained when registering) to exchange the OAuth Token with GitHub. Then use postMessage API to send the token back to GitHub1s (The message listener is registered in Step 2).
  5. Finally, GitHub1s got the OAuth token and used it to read the data of repository.

If you deploy it yourself, you should register your own GitHub OAuth App, and the Authorization callback URL is set up by yourself.

Hope the above content is helpful to you.

from github1s.

welcome avatar welcome commented on August 11, 2024

Hello there!👋 Welcome to the project!💖 Thank you and congrats🎉for opening your very first issue in this project.Be patient while we get back to you.😄

from github1s.

github-actions avatar github-actions commented on August 11, 2024

Hello there nicklpeterson 👋

Welcome to github1s !!💖🥳

Thank you and congratulations 🎉 for opening your very first issue in this project. github1s fosters an open and welcoming environment for all our contributors.🌸

Incase you want to claim this issue, please comment down below! We will try to get back to you as soon as we can.👀

Feel free to visit github1s.com. 👩‍💻 If you have any interesting ideas, just open an issue. We would love to hear you and engage in discussions.

from github1s.

nicklpeterson avatar nicklpeterson commented on August 11, 2024

Thank You! That is very helpful.

from github1s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.