Question

After a lot of reading and researching i found the following library, the most suited to work for my needs: to signup/login a user using a custom google apps domain.

I did the following settings:

GOOGLE_APPS_DOMAIN = 'example.com'
GOOGLE_APPS_CONSUMER_KEY = 'example.com'
GOOGLE_APPS_CONSUMER_SECRET = '*sekret*'
# domain where your application is running
GOOGLE_OPENID_REALM = 'http://*.hudora.biz/'
    GOOGLE_OPENID_ENDPOINT = 'https://www.google.com/accounts/o8/ud'

added custom middlewares and other stuff.

But from now, where do i take it further, showing a form and making form posts to urls, how do i ask user information, it is not given in the docs.

  • Can anybody please help me with it?
  • How do i give a user the functionality to login/signup?
  • How do i customize a view?
Was it helpful?

Solution

You are almost there. For the sake of testing it on your localhost following are things you need to do:

  1. You need to register an app at the Google API Console (while registering, put your domain 127.0.0.1:8000 or the exact location where your server is running)

  2. You need to check the scope for your project, eg. calendar or maps etc.

  3. You need to get the secret key.

  4. Once you have got the secret, put them in your settings file, as described above. Change example.com and *.hudora.biz to 127.0.0.1:8000

  5. Import the views from the library views for login and logout and map them to your urls probably login/logout.

This is all that is reqd. Hope it helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top