Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6802199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:11:41+00:00 2026-05-26T19:11:41+00:00

Hey all… I have been reading the tornado doc and came across open id

  • 0

Hey all… I have been reading the tornado doc and came across open id mixin so I thought to myself “Wicked no horrid password system on my side” then I looked into how to implement it, the only example I came across was this

class GoogleHandler(tornado.web.RequestHandler, tornado.auth.GoogleMixin):
    @tornado.web.asynchronous
    def get(self):
        if self.get_argument("openid.mode", None):
            self.get_authenticated_user(self.async_callback(self._on_auth))
            return
        self.authenticate_redirect()

    def _on_auth(self, user):
        if not user:
            raise tornado.web.HTTPError(500, "Google auth failed")

Which doesn’t show the bigger picture, like routes, appsettings etc etc
# Save the user with, e.g., set_secure_cookie()

So my question is. How does this fit into the bigger picture that is a tornado site.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:11:41+00:00Added an answer on May 26, 2026 at 7:11 pm

    This handler does not depend on other parts of application, you just set it on something like ‘/login/google’ in url conf and place a link to this url somewhere on your website.

    User clicks on it and gets redirected to google auth page (if it’s logged out of google) or to a page asking to grant permission to acces his/her basic info. If user accepts – browser gets redirected back on this url handler and control comes to _on_auth method, where the user object, if present, contains a dict with user’s email, name, location settings and a bunch of other stuff (just dump this variable to logs to see all of it).

    At this point you can do whatever you want with this data, but in general it can look something like this:

    1. check whether you have user with this email in database
    2. if you have: you retrieve it’s id and set it to his (secure) cookies
    3. if it is not present: you create it with provided data, save to database, optionally send email with autogenerated password and also set the cookie
    4. redirect somewhere else in your application: to his profile, home page or whatever you need
    5. now your user has cookie available in all other handlers, usually you will use it while overriding RequestHandler.get_current_user method
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all i have a JSFiddle that i have been working on with trying
Hey all. Here is the scenario. I have the below code, and I'm needing
Hey all. I'm reading from one sql-format file to another, and two bytes in
Hey all i have two JFrames one is my main login frame, user enters
Hey all i have an XML file that i am trying to loop though.
Hey all, have a slight problem here. In CakePHP I have a controller that
Hey all. I've been been trying to figure this out for a while now.
Hey all- I have looked this up on here and Google but none of
Hey all here are my tables i have placed in a DIV for each.
Hey all. I'll try to make this brief and simple. :) I have 40

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.