UNLINK OR RELINK - Google assistant account linking flow - dialogflow-es

I am developing a custom action for google assistant.
In order to get user data and other user info. I need allow account linking flow.
My Account Linking flow:
Open the Google Assistant app on Android or iPhone.
Say the Action – "Talk to My test app”
Read and agree to the Action Terms and Conditions that appear on the screen.
Sign in with Web app.
Go back to Google assistant and ends linking flow
Everything works properly. But once account linked, I am not able to test the flow again
Could anyone suggest, how to unlink my account and test the above account linking process again? Thanks in advance

During development you can unlink your account via the actions on google console. If you navigate to the test window, you can see a settings button on the top right, click that and a setting pop-up should open. There you should look for an unlink button.
This will unlink your account, so when you restart the conversation for your action with this account, you will be prompted to sign-in again via accountlinking. This also works if you are testing on your phone. You just need to make sure that the account on your phone and the simulator are the same.

Related

how to delete "google sign in account" for development purpose - actions on google

I'm working with actions on google and dialogflow, and recently they proposed google signin to make account linking fast without writing own oauth server.
Today I implemented their google signin in my dialogflow app it is working quite fine but unfortunately I am unable to delete that account to check all development aspects, I tried my other google accounts and my friends account but soon ended up out of accounts
Un other methods when i enable and disable testing it forget about linking but in google signin it is tightly stick with the account, and i have tried almost everything i can try like restarting my phone and clearing cache of chrome browser but it looks like it is saving account somewhere in cloud.
What i need to do is, when i sign in first time it ask for name permission, i need that screen again and again for testing something
Google calls this Removing a Website or App that has access to your account. It is done using the myaccount.google.com console.
If you want to do this using Android, the easiest way is to:
Open your device's Settings app Settings app and then Google and then Google Account.
At the top, tap Security.
Under "Signing in to other sites," tap Signing in with Google.
Tap the name of your project.
Choose Remove access.
Through the web, you can go to Apps With Access to your Accounts:
Scroll down to the "Signing in with Google" section
Locate your project.
Select it, and choose "Remove access"
The name that is shown should be the name you've given to your project as part of the OAuth screen. If you haven't set that up (and if you're just playing around, you probably haven't), it will use the Project ID for your project. You can find this on the Cloud Console home screen attached to the same project name that you used in Dialogflow and the Action Console.
While you're in there, you will probably want to configure the OAuth screen to have a name for the app as it will be visible to users on the OAuth screen. From the menu, select "APIs & Services" and then "Credentials"
Select the "OAuth consent screen" tab, and fill in the "Application name".
This name should then be in the list of applications you have installed, and can remove.

How to sign out of google account that is authenticated with Android studio firebase cloud testing

I am trying to use the AS cloud testing tab for running espresso tests on FTL. But realized that I authenticated with a wrong google account.
How can I sign out of this account and login with a different google account.
I tried restarting AS with no use.
Is deleting the cache an option? Where is the cache for this located, I can try to manually delete a file.
Found out there is a menu item in AS like this
Click on it would show an add account option and let's us login into a different account and sign out
After this quit android studio and reopen

Logout the user from actions on google

Is there any way to logout Or switch the account in actions on google? I am using account linking with Google (OAuth and Google SignIn) I want to do something like this that if the user says "Logout me from this account OR switch to another account", the action should logout him and open the google authentication.
I saw some of the Helpers intent in the documentation but not found any Helper for signout/logout.
Could you please help me that how can I logout the user by saying "logout from account or switch to another account"
Keep in mind that "Account Linking" isn't really logging in. It is connecting the Google Assistant account they're using to the account you use on your system. If you're using just Google Sign In for Assistant, then you just want access to the information about the account they're using.
So "logging out" isn't quite what you're asking to do. In the first case, you want to "unlink" their Assistant account from the account on your system. In the second case, you want to forget who they are.
To do the "unlinking", you can return HTTP code 401 "Unauthorized". This will force the Assistant to discard any tokens they have for the user. Users can also do the unlinking through your directory listing.
Forgetting who they are is more difficult. There is nothing in AoG that does this directly, although you can direct them to a page that calls the sign out method for Google Sign In. They can also do the unlinking through the directory listing or through Google's account management page.
Account linking can be turned off by clicking at that account logo below in case you want to test the intent again and redirected to sign in automatically every time.

How to test NEW_USER handler in JOVO , with google home

I am developing a new google home app. The google action is written in Dialogflow. The web hook is written in node js using JOVO framework. The action requires account linking with OAUTH.
I am trying to simulate and test "first time user" or "new user". In JOVO this is handled with a handler called NEW_USER.
I am looking to create the correct testing conditions so NEW_USER is triggered, unable to do so. Tried the following
1) https://support.google.com/googlehome/answer/7126338?co=GENIE.Platform%3DAndroid&hl=en - this contains a section in Step 2 to unlink the app. This does not work as described , as my action is yet unpublished I do not see it in the section as described, so I cannot unlink it.
2) I go to dialog flow and force a change in some intent - this seams to unlink my account. So now when I open my action "ok google , talk to XYZ" it asks for account linking - however, after account linking it does not go to NEW_USER handler, it seams to remember that I am not a new user.
3) Go to my OAUTH server and logout the user - google assistant still remembers that user is not new user
4) Create a new OAUTH user from google home app while doing account linking - even then NEW_USER is not triggered. The google assistant still remembers and does not treat me as new user.
Is there a way to create conditions to test a new user on google home?
Just a side note, this is easy on Alexa. In Alexa app, if you disable your skill and re-enable it, all previous history is lost and NEW_USER is triggered. So I am able to test "first time user" condition for developing Alexa.
We had success using the account linking URL provided in the Google Assistant Simulator and clicking on "unlink my accounts": https://gala-demo.appspot.com/

How do you test Account Linking with Actions On Google with a separate test account prior to deployment?

I've built an Action using API.AI, and set it up with integration to Actions On Google. A webhook is used for fulfillment, together with account linking. I've followed the directions here to complete testing using my main google account that gives me access to the unpublished action in the web simulator and on my Google Home device that is set up with the same account.
Now it's time to deploy my Action. These instructions detail the process. One of the steps is to provide testing instructions for the Google reviewers that will approve the deployment. If you use account linking, it is necessary to provide them with test user credentials. Here is specifically what they request:
Provide any additional information needed to test your agent. If your agent requires account linking or login information, you must provide a username and password for a test account. Please make sure that any provided accounts are not real user accounts. This information will only be used by the review team, and will not be visible to users.
I've set up a test account for this purpose. I would obviously like to test my Action using the test account (instead of my main account) prior to submission for deployment. How do I do this?
If I use the web simulator and login with the test account, when I try and invoke the Action with my invocation name I get 'Sorry, this action is not available in simulation'.
When developing an Alexa Skill, Amazon provides for this as described here. While researching, I see references to similar provisions for Android developers with Google Play here. Where is the same thing for Actions On Google?
The test account is for the account linking step only.
To test your action in the simulator, you should be using the developer account you used to submit the action for review. The test account is used once your action is invoked and account linking is required to continue using your action.

Resources