kandi X-RAY | github-login Summary
kandi X-RAY | github-login Summary
React component for GitHub login. This project originally created and maintained by Checkr. However, after over a year of inactivity it appears this repository is abandoned. With many issues open, I decided to clone and maintain this repo myself. Credit goes to Kurt Ruppel from Checkr for being the original developer on the project. This project is now being updated and maintained by donmorton.
Top functions reviewed by kandi - BETA
- Convert query parameters to query string
- Parse a query string
- validate props
- Call a function
- lit helper function
- Creates a new Object
- Creates an instance of another
- call a function
github-login Key Features
github-login Examples and Code Snippets
Trending Discussions on github-login
I have implemented
GitHub-Strategy. Here's the Glith.
It works wonderfully and I'm receiving the user-profile on redirect from GitHub.
Now, I'm only trying to understand how this actually works 'under the hood'. I did not find any similar question here on stackoverflow, neither on Passport.
So if I open Chrome Developer Tools during the Auth-Flow, the following seems to be going on when I click on Login with GitHub:
- the node route
- node redirects to
- the user is presented with GitHub-Login-Page
- User types in GitHub-credentials and clicks 'Login'
- GitHub checks the credentials
- If valid credentials are provided, user is authenticated and GitHub redirects to the registered callback-endpoint, which is in my case:
- The callback-url has a url-parameter, e.g.
?code=02337a951c242b9202fd. It's interesting to note, that it's a GET-method and nothing else is provided.
- On the server, the
passport.authenticate('github', ...)method is called inside of the
- When the GithubStrategy is instanciated, a callback-function is passed with the signature
function(accessToken, refreshToken, profile, cb). Somehow magically, the
profileare fully available here. And I don't understand how this happens.
How is passport receiving the profile?
node.js making a server-side call to GitHub? Maybe with the
ANSWERAnswered 2020-May-10 at 13:53
Yeah that is exactly what NodeJS is doing. This doesn't have anything to do with Passport.JS or Node.JS. It is the OAuth mechanism of how authorizations work.
Whenever a the Identity provider like twitter/facebook calls your
/callback with a
?code= query param It then hits another url and gets the AccessToken, RefreshToken and Idtoken(which is basically the user profile).
You can check out in the source code as well:
I am running an app in a kubernetes service on Azure and have had it set up with an NGINX ingress controller and a public IP address with a FQDN. This was all working fine.
I then wanted to add security through using the oauth2-proxy for third party sign-in. I would like to keep my setup to one ingress-controller and one oauth2_proxy per namespace, with multiple apps running together. As Azure does not support the use of sub-domains for this I have been using paths to route to the correct app. I've seen examples, like this, on how to use one oauth2_proxy for multiple sub-domains but is it possible to get it working with multiple paths instead?
This is the current working setup with only one app, located on root
/. I would like to switch to an app specific path and the ability to run multiple apps on different paths. eg.
ANSWERAnswered 2020-Apr-05 at 21:44
Sure, it's doable with multiple ingress paths inside single Ingress resource definition, please check this working example:
No vulnerabilities reported
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page