FOSSASIA
loklak/NodeJs/Github API: Login with Github to a NodeJS Application.
Write a simple NodeJS server that allows users to login with Github and when logged in show a welcome message with their username.
Objective
The idea of this task to evaluate a login with Github to a loklak app and let students learn the OAuth flow of Github.
Steps
- Read the instructions on Github about the flow of OAuth for web applications.
- Register a sample app with GitHub to obtain a Client Id and secret. (Don't share these with us)
- Write a NodeJS server that use the taken token to make a request to get the authenticated user. (https://developer.github.com/v3/users/#get-the-authenticated-user)
- Refer this guide for making a NodeJS web server: http://blog.modulus.io/build-your-first-http-server-in-nodejs
- Host your code on github
Outcome
- A web application with a "Login with Github" button that shows a welcome message when the user logged in.
- Post a message about your task at FOSSASIA Google Code-In on Twitter (Weibo or another service), e.g. "Created a @github login with #Nodejs at #FOSSASIA #GCI http://link-to-app-repository @fossasia @bkeepers"
Task tags
Students who completed this task
Yago González, Jason, Yasoob