Cloud connected devices embedded browser issues with implementing Oauth2.0 Google sign-in

Hi SmartThings support team,

I am implementing Oauth2.0 Google sign-in with our cloud connected devices. I have a question why SmartThings app will open a Safari browser again especially while redirecting to the url with domain https://accounts.google.com ??? And why even the Google sign-in process is done the SmartThings app will show a SmartThings 404 page??? Although the account linking is successfully done.

I noticed that while adding my device, firstly the SmartThings app will open an embedded browser. Then when I click my google sign-in button which will redirect to the url to start Oauth2.0 process:

https://accounts.google.com/o/oauth2/v2/auth?client_id={{google_client_id}}&redirect_uri={{google_redirect_uri}}&response_type=code&scope={{google_scope}}

The SmartThings app will open an additional Safari browser.

I have done some tests to make my button redirect to other urls. Only the url with domain https://accounts.google.com will open an additional Safari browser. Other domains won’t. And Facebook sign-in won’t open an additional Safari browser either.

iOS Google sign will open an additional Safari browser. And will return 404 page. The device was linked though.

iOS I make my button redirect to https://www.google.com/ won’t open an additional Safari browser.

iOS I make my button redirect to https://maps.google.com/ won’t open an additional Safari browser.

iOS I make my button redirect to https://www.smartthings.com/ won’t open an additional Safari browser.

iOS I make my button redirect to https://accounts.google.com/ even without query strings will open an additional Safari browser.

iOS Facebook sign-in won’t open an additional Safari browser.

This issue only happens in iOS devices. Android Google sign-in is normal. Won’t open browser twice. Won’t return 404 page. The password was changed after the demo by the way.

Why the special treatment is done for the domain https://accounts.google.com/? Can you please tell me why and is there anything I can do to solve this issue on my side?

Just so you know, these forms are not an official Samsung/SmartThings support site. It was created to allow users to help other users.

Hi @exosite, I’m from the Developer Support Team, thanks for contacting us.
In order to investigate your issue, could you send us the information (appId, requestId (if you have one), timestamp) through email here build@smartthings.com?
Thanks.

I love it when support asks people to email them in forums. the entire point of posting these things is so people can find solutions to their issues. then when we finally find someone who has a similar issue, the solution is hidden in some email thread kept from the general community. guess I can email you about my issue, huh? ugh.

Hi, @delray2
Welcome to the SmartThings Community!

We needed to change the communication channel because we cannot share private information here, but if you post here just as you did, we’ll see it and we can provide guidance for you as well.
In this case, after the investigation, the engineering team worked on a fix that was implemented on the ST app version 1.7.11.28 of iOS.
The Google sign-in requires opening Safari, it cannot use the embedded browser of the app, so, the fix is to avoid showing the 404 error because of the redirection.

@exosite confirmed the error was gone, are you experiencing it as well? Which version of the app are you using?

1 Like