1
0
Fork 0

Merge branch 'master' into 'master'

Add missing login URL when using social auth

See merge request librespacefoundation/satnogs/satnogs-network!778
merge-requests/778/merge
Vasilis Tsiligiannis 2019-09-28 10:49:04 +00:00
commit 37cbd090d3
1 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@ import requests
from social_core.backends.oauth import BaseOAuth2
class Auth0(BaseOAuth2): # pylint: disable=W0223
class Auth0(BaseOAuth2):
"""Auth0 OAuth authentication backend"""
name = 'auth0'
SCOPE_SEPARATOR = ' '
@ -17,6 +17,10 @@ class Auth0(BaseOAuth2): # pylint: disable=W0223
"""Return the token endpoint."""
return "https://" + self.setting('DOMAIN') + "/oauth/token"
def auth_html(self):
"""Return the login endpoint."""
return "https://" + self.setting('DOMAIN') + "/login/auth0"
def get_user_id(self, details, response):
"""Return current user id."""
return details['user_id']