Add missing login URL when using social auth
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>merge-requests/778/head
parent
8084263697
commit
06da2b8cca
|
@ -2,7 +2,7 @@ import requests
|
||||||
from social_core.backends.oauth import BaseOAuth2
|
from social_core.backends.oauth import BaseOAuth2
|
||||||
|
|
||||||
|
|
||||||
class Auth0(BaseOAuth2): # pylint: disable=W0223
|
class Auth0(BaseOAuth2):
|
||||||
"""Auth0 OAuth authentication backend"""
|
"""Auth0 OAuth authentication backend"""
|
||||||
name = 'auth0'
|
name = 'auth0'
|
||||||
SCOPE_SEPARATOR = ' '
|
SCOPE_SEPARATOR = ' '
|
||||||
|
@ -17,6 +17,10 @@ class Auth0(BaseOAuth2): # pylint: disable=W0223
|
||||||
"""Return the token endpoint."""
|
"""Return the token endpoint."""
|
||||||
return "https://" + self.setting('DOMAIN') + "/oauth/token"
|
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):
|
def get_user_id(self, details, response):
|
||||||
"""Return current user id."""
|
"""Return current user id."""
|
||||||
return details['user_id']
|
return details['user_id']
|
||||||
|
|
Loading…
Reference in New Issue