External authentication page

(renata.begnigna@digitalindustry.com.br) #1

Good morning everyone,

I would like to know if it is possible to open an external page so I can authenticate my user with a login and a password, if at all possible, how do I synchronize this page with Flow XO to get the authentication return ?.

I recently opened a question about this by email, however I was informed that it is possible to do this, but I do not know how to do it.

can you help me?
Thank you

userID for authentication
(Khashayar) #2

Yeah it’s possible.

You have to make a card with a log-in button. Like this:

You’d make a Custom Request action, use the card template code but in the “buttons” part, you’d put this code:

"buttons":[
  {
     "type": "account_link",
     "url": "https://www.example.com/authorize"
  }
]
...

Which in practice looks like this:
http://www.jsoneditoronline.org/?id=a877de1f59a5c04b79e3284350380a05

Facebook then will give you a confirmation back like this:
https://developers.facebook.com/docs/messenger-platform/webhook-reference/account-linking

Check this out on how to activate the Account Linking webhook event in your app: https://developers.facebook.com/docs/messenger-platform/webhook-reference

Also these are helpful to skim through:

Log-in: https://developers.facebook.com/docs/messenger-platform/account-linking/link-account
Log-out: https://developers.facebook.com/docs/messenger-platform/account-linking/unlink-account

(renata.begnigna@digitalindustry.com.br) #3

Hi Khashayar,

Thanks for the feedback, now it was clear the operation, I was able to generate the template with the button, but I had two doubts:

1 - What should I create in Flow XO to retrieve information from my external page?

2- My page has user and password, how to tell Flow XO that if the user is valid or not? I did not understand how to return the information to the bot

(me, personally) #4

Hey guys. I found this thread and would ask you something.
I’m building a bot using microsoft bot framework c# sdk.

How to post that account-linking card using c# sdk ?

Thank you in advance :slight_smile:

(Fizan Nagarchi) #5

Can you please explain the process, because no matter how many times i do, I was unable to get account_linking status in the request, I was able to get redirect_uri and token and the authorize the user and redirect to fb and everything worked without an error but the status is not visible in the later requests