Skip to content
blog.fossasia.org
  • Home
  • Projects
    • Contribute
  • Events
    • Eventyay Platform
    • Event Sponsorships
    • Event Calendar
    • FOSSASIA Summit
    • OpenTechSummit China
    • OpenTechSummit Thailand
    • OpenTechSummit Vietnam
    • Jugaad Fest India
    • Past Events
      • FOSSASIA Summit 2022
      • FOSSASIA Summit 2021
      • FOSSASIA Summit 2020
      • FOSSASIA Summit 2019
      • FOSSASIA Summit 2018
      • FOSSASIA Summit 2017
      • FOSSASIA Summit 2016
      • FOSSASIA Summit 2015
      • FOSSASIA Summit 2014
      • FOSSASIA Summit 2012
      • FOSSASIA Summit 2011
      • FOSSASIA Summit 2010
      • GNOME.Asia 2009
      • MiniDebConf Vietnam 2010
      • Sciencehack.Asia
      • Science Hack India
  • Programs
    • Programs and Opportunities
    • Jobs Opportunities
    • Program Guidelines
    • Codeheat Contest
    • University Internship Program
    • University Student Coding Programs
    • High School Student Program
    • Advanced Developer Program
    • Become a Mentor
      • Become A University Student Mentor
      • Become A High School Student Mentor
  • Shop
  • Blog
  • About
    • Jobs
    • Membership
    • Activities
    • Background & Mission
    • Best Practices
    • Licenses
    • Team
    • Code of Conduct
  • Donate
Menu Close
  • Home
  • Projects
    • Contribute
  • Events
    • Eventyay Platform
    • Event Sponsorships
    • Event Calendar
    • FOSSASIA Summit
    • OpenTechSummit China
    • OpenTechSummit Thailand
    • OpenTechSummit Vietnam
    • Jugaad Fest India
    • Past Events
      • FOSSASIA Summit 2022
      • FOSSASIA Summit 2021
      • FOSSASIA Summit 2020
      • FOSSASIA Summit 2019
      • FOSSASIA Summit 2018
      • FOSSASIA Summit 2017
      • FOSSASIA Summit 2016
      • FOSSASIA Summit 2015
      • FOSSASIA Summit 2014
      • FOSSASIA Summit 2012
      • FOSSASIA Summit 2011
      • FOSSASIA Summit 2010
      • GNOME.Asia 2009
      • MiniDebConf Vietnam 2010
      • Sciencehack.Asia
      • Science Hack India
  • Programs
    • Programs and Opportunities
    • Jobs Opportunities
    • Program Guidelines
    • Codeheat Contest
    • University Internship Program
    • University Student Coding Programs
    • High School Student Program
    • Advanced Developer Program
    • Become a Mentor
      • Become A University Student Mentor
      • Become A High School Student Mentor
  • Shop
  • Blog
  • About
    • Jobs
    • Membership
    • Activities
    • Background & Mission
    • Best Practices
    • Licenses
    • Team
    • Code of Conduct
  • Donate

flask login

Oauth 2.0 Login System

  • Post author:aditya1702
  • Post published:June 10, 2016
  • Post category:Event Management
  • Post comments:0 Comments

Oauth login is seen everywhere nowadays. It basically refers to allowing people to skip the default ‘Sign Up With Us’ part and instead use their already created profiles on social sites like Facebook, Google or Twitter to log into an application. We have added a ‘Login with Google’ and ‘Login with Facebook’ functionality to our Open-Event login page.

13

However a lot goes on behind the back when a user clicks the ‘Login with Google’ button. Firstly a project has to be made and registered on the Google Developers Group with which we can use Google APIs and generate client details. I created an account and a project – Open-Event Server- on my Google Developers Group and generated a set of Client Ids and Client Secret to be used in my code for the login system.

14.png

After that I wrote the code for logging in via the Google button. This is the list of URLs which are used during the process

15.png

The Client details are obtained after creating an account. The AUTH_URI is the url where the user is taken to after clicking the button i.e. the Google Accounts page. The TOKEN_URI is the url from where a token is obtained by the app from Google to access the client details. And the USER_INFO url provides the necessary user details. Once an access token is obtained by the application it can send it to the server which verifies it and provides access to the user’s profile. The SCOPE defines how much of each user’s info can be accessed. Here we only need the profile and email but we can specify other details also. On accessing the AUTH_URI the user is redirected to this page:

16.png

Continue ReadingOauth 2.0 Login System
  • FOSSASIA
  • Blog
  • GitHub
  • Projects
  • Code of Conduct
  • About
  • Contact
Copyright - OceanWP Theme by OceanWP
 

Loading Comments...
 

You must be logged in to post a comment.