How to start a Flow with user subscription - django

We are using Django-allauth for user subscription management with an optional email confirmation and few social provider (facebook, google, etc).
We wanted to start a flow when the confirmation email in sent.
The entire flow doesn't use views as it just sends emails to convince new users to complete their profile.
The StartView seems to be required in Flows, and I don't understand how to activate the flow without a view.

Related

How can I allow users to send emails through my django app but coming from their own gmail account?

I have a django app where users can send emails through the app to contacts that they upload themselves. I use Sendgrid to send the email and the recipient receives an email from a "white-label" address like hello#mydomain.com
Now, I would like to implement a system where I can allow users to send emails through our app but that those emails are sent by their own email address. To make it simple, let's just consider "Gmail" and if a user want they can "login with their gmail account" on my app and then send emails from my app that are sent from their account... I know that Gmail has an API and I wonder if I can leverage it to do what I need.
You can definitely send emails using Gmail API methods but keep in mind the below stated in their official documentation:
Note: The Gmail API shouldn't be used to replace IMAP for developing a
full-fledged email client. Instead, see IMAP, POP, and SMTP.
As they recommend, you could integrate IMAP/SMTP features in your application so users can authenticate/provide access to their accounts and achieve your goal of having emails sent from their accounts.

AWS Pinpoint fails to send emails to SignInWithApple users

I am using AWS Cognito to manage my user pools. Users can signup using email, Apple, Facebook & Google.
Email registered users are required to confirm their account (through email verification). I want to have the same behaviour for social signup but unsuccessful (will leave this issue for another question).
I am using AWS Pinpoint to reach my user pool by email. When creating a campaign only users who did signup with email & password receives the email (not social users), and I don't understand why. Any idea of what could be the cause of the problem, or perhaps the solution?
Additional information:
Tried verify social user's emails manually (using aws admin privileges) => users still don't receive emails.
Did export my segment to csv, and apple relay email endpoints are in the segment (with an Active status) => but still no email received by social users (not forwarded for this case)
Thank you all for you assistance

How to verify users email with token generator link for signup in django webapp

I am doing a web app in Django. I hardly tried to create a TokenGenerator for verifying the user's email to activate the user's account
coming to the problem,
how to send the verification email to the user account while
signup. while signup, users can receive a verification link email
with a token generator
the user has to input the password at the time of account signup
After verifying the email user can log in to the respective page via their mail id and password
while login it should check whether an email is present in the DB
(DB will be updated with user emails )
for the first question, Django has built-in functions and classes for sending emails, you can check them here: https://docs.djangoproject.com/en/3.2/topics/email/ and this post will help you send and email: https://dev.to/yash2115/how-to-send-e-mail-in-django-37ge, and if you want sen an email for any user's sign up you have to use signals, check it here: https://docs.djangoproject.com/en/3.2/ref/signals/
other questions are all related and they are pre-built in Django, these links will help you: https://learndjango.com/tutorials/django-login-and-logout-tutorial
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Authentication
repositories which may help:
https://github.com/shoukreytom/pdfstack
https://github.com/shoukreytom/notes
https://github.com/shoukreytom/blog (advanced - apis)
https://github.com/mitchtabian/Food2Fork

How to get the user login device during the custom authentication flow? AWS Cognito

I want to achieve the following user case:
If the user logged in with a new device, my app will send an email to notify the user and requires the user to enter the code in the email to successfully logged in the app.
The way I thought is to create a custom authentication flow to achieve this, but I cannot find any information about the user login device in defineAuthChallenge and createAuthChallenge. Did I miss something here? Is this the correct way to achieve the user case?
More info about the custom authentication flow:
https://aws.amazon.com/blogs/mobile/customizing-your-user-pool-authentication-flow/
You can try to implement this using the post authentication lambda trigger. This will send you the user login details (except password) when user attempts to sign in.

Is it possible on Drupal 8 to allow users register themselves and receive confirmation email?

On Drupal8 board /admin/config/account setting, I've checked box that allow users to register themselves and get approve from admin.
I’ve created a new user account and got confirmation as below:
“Thank you for applying for an account. Your account is currently pending approval by the site administrator.
In the meantime, a welcome message with further instructions has been sent to your email address.”
I’ve never got welcome message even so I could see the user that I’ve created under /admin/people - it was blocked.
I’ve checked spam folders, used different browsers but there were no confirmation email as such…
So, I as admin, unblocked this account - but I still could not login since I don’t have any confirmation email with password.
I could only login user if I, as admin will provide login id and password for user.
Is it possible on Drupal 8 to allow users register themselves and receive confirmation email?
If so, how to do so?
Or there is only admin could register the users and users could not register themself?
Thanks.
SMTP server requires authentication to be enabled.
I’ve tried to send and test sending mail using account that is not connected to my hosting - it wouldn’t work.
So, I have set up a mailbox in the account, updated its details in SMTP AUTHENTICATION section as well as in E-MAIL OPTIONS section.
I sent an email to my test account by saving the configuration and it was successfully delivered.
So, the users could sign up, get confirmations by email and register themselves by changing their passwords.