React confirm email with request from API - reactjs

I'm stuck with a problem.
Any user that create an account get an email (sent from backend) with a link confirmation.
When the user click that link, it send a request type:
{
"confirm_link": "/auth/confirm/id/emailtype/****token****"
}
My problem is: How do I check in my front if the user has clicked so I can be able to display a simple react toast like 'Your account as been verified' ?
Thank you !

Once the email confirmation request is completed you can use websockets to send a message from server to client notifying that account is verified.you can display your toast

Related

How to get a mail in response, of the form submission by the User In Strapi

I am new to Strapi and I want to create functionality, when a user submits form (from the frontend made in React js), in response to it the User will get a mail of form submission.
to send email in response of the type of request made

azure logic app not able to retrieve who is the approver after approving the mail(UserEmailAddress- showing Null)

I have created a flow using logic apps where once the owner approves the mail I need to know who approved that mail. While using normal my account I am able to retrieve the user who approved the mail but while using the service account am not able to retrieve the values. All the values its showing as null while using the service account.
How do I get the --> email address <-- of the user that selects 'Approve' or 'Reject' buttons in the email? If an email is forwarded to another person I would like to know who (email address) clicked approve or reject.
After reproducing from my end, I observed that when the mail is viewed in HTML format this doesn't work and also while forwarding the mail, but this works when the response is sent through the adaptive cards and not the HTML message that are received during the Send email with options action. One way that this can work is when you use only the adaptive cards that are send as the request.
RESULTS:
and when you use HTML responses then below is something how you'll be receiving the response.
You can also try Creating your own actionable messages for Flow Approvals by StefanS365 where in you add provider in Actionable Email Developer Dashboard and request the approvals.

how to create a firebase customized action URL for email address verification in react.js?

I'm developing an application using react.js. When A user is registering using email and password and the user is getting a verification email in his email. When the user is clicking on the verification link, then a new tab is opened and the verification is completed without any option. But I want that when the user clicks on the verification link some options will come up (for example: yes/no) and Once the verification is complete the user will be taken to that website page.

how can i verify a user after registering with email

How do I hit a verification endpoint to resend auth token like the image below in my react application
im using redux
PS: To clarify, I want to hit that resend/token/(email address) endpoint so it'll send the user a code to their mail then take them to a verification page where they'll put the code sent to their mail then complete their registration. I'm confused as to how I'll implement it. do I implement it in the registration component or verification component I'm using redux as state management.
if i'm clearly understand . You have to creat a route called resend , In the component resend at the life cycle didMount you get the token from the url and you send a request to api to verify the email of user .

How to make buttons work on a messenger chatbot?

We are developing a Facebook Messenger chatbot but we are having issues integrating our chatbot with Facebook Messenger.
When, during a chat, the user sends a text message our webhook receives the data and does all the processing accordingly.
But when we send the user a menu with buttons and the user clicks the buttons instead of typing a message our webhook doesn’t receive the payload ar any other data that we were supposed to receive.
When the user starts a conversation with our chatbot we send them the following message:
{
"recipient":{
"id":"2492007720844646"
},
"message":{
"attachment":{
"type":"template",
"payload":{
"template_type":"button",
"text”:”What do you prefer?”,
"buttons":[
{
"type":"postback",
"title”:”Blue",
"payload":"{'function':{'name':'color_blue'}}"
},
{
"type":"postback",
"title”:”Red”,
"payload":"color_red"
}
]
}
}
}
}
If the user clicks the button titled “Blue” our webhook doesn’t receive the payload “color blue”. On the other hand, if the user types the message “color blue” our webhook receives it without any problem.
If I try to simulate the problem using my own Facebook user, which is the app administrator, when I click the button the webhook receives the payload “color blue” without any problem but when any other user tries the same thing then our webhook won’t receive the payload. I suspect it is a problem with my app’s permission but I’ve already added to the app all permissions I think it needs.
Click here to see an image with an example of what we are trying to do
Note that the options on the left are provided automatically by the bot and the user just need to click on those options to keep the conversation going. There is no need for the user to type anything. Our problem is that when the user clicks on the options in the left we don't receive that message and therefore we can't do anything.
I couldn’t find any documentation related to this kind of behavior, can someone help me, please?
Any help will be very welcomed.
Thanks and please let me know if you need any further information.

Resources