Services
hypha.apply.users.services
¶
PasswordlessAuthService
¶
The service utilized to handle passwordless auth requests.
Determines if a user is logging in or signing up, and sends the appropriate magic links.
Parameters:
-
request
(HttpRequest
) –HttpRequest object.
-
redirect_field
–The name of a field containing the redirect URL.
-
extended_session
(Optional[bool]
, default:False
) –Include the
remember-me
param in the magic link, defaults to False.
Source code in hypha/apply/users/services.py
login_token_generator_class
class-attribute
instance-attribute
¶
login_token_generator_class = PasswordlessLoginTokenGenerator
signup_token_generator_class
class-attribute
instance-attribute
¶
signup_token_generator_class = PasswordlessSignupTokenGenerator
next_url
class-attribute
instance-attribute
¶
next_url = get_redirect_url(request, redirect_field_name)
get_email_context
¶
send_email_no_account_found
¶
Source code in hypha/apply/users/services.py
send_login_email
¶
Source code in hypha/apply/users/services.py
send_new_account_login_email
¶
Source code in hypha/apply/users/services.py
initiate_login_signup
¶
Send a passwordless login/signup email.
If the user exists, send a login email. If the user does not exist, send a signup invite email.
Parameters:
-
email
(str
) –Email address to send the email to.
Returns:
-
None
–None