07-09-2024 09:21 AM
I have created the a oauth web page UI that works with authroization code flow
First as soon as user clicks on works with google on google home app, I opens up my authorize url displaying my UI.
In UI im showing a consent popup which has agree and cancel button.
when user click on Agree he will allowed to enter phone number and proceed with flow. Im using one redirect uri to share authorization code.
But when user click cancel how can i redirect user back to the google home app ?
Does google provide any redirection link to redirect user back google home app ?
I have refer documention i couldnt find one that elaborates on this.
Answered! Go to the Recommended Answer.
07-15-2024 09:31 AM - edited 07-15-2024 09:32 AM
Google Home app does not provide a specific redirection link for navigating back to the Google Home app after a user cancels during the OAuth consent flow. However, you can handle both success and cancellation scenarios using your redirect_uri
.
When the user clicks "cancel" in your consent popup, you can redirect them back to the specified redirect_uri
with a query parameter indicating that the action was canceled. This way, your system can detect the cancellation and respond appropriately.
Moreover, instead of providing a "cancel" button, consider just adding text that informs the user about the implications of signing in. For example:
"By signing in, you are authorizing Google to control your devices."
This approach helps streamline the user experience and ensures they are aware of the consequences of their actions without needing an explicit cancel option.
07-15-2024 09:31 AM - edited 07-15-2024 09:32 AM
Google Home app does not provide a specific redirection link for navigating back to the Google Home app after a user cancels during the OAuth consent flow. However, you can handle both success and cancellation scenarios using your redirect_uri
.
When the user clicks "cancel" in your consent popup, you can redirect them back to the specified redirect_uri
with a query parameter indicating that the action was canceled. This way, your system can detect the cancellation and respond appropriately.
Moreover, instead of providing a "cancel" button, consider just adding text that informs the user about the implications of signing in. For example:
"By signing in, you are authorizing Google to control your devices."
This approach helps streamline the user experience and ensures they are aware of the consequences of their actions without needing an explicit cancel option.