# Unable to use SSO (Single Sign On) Service

**URL:** <https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367>\
**Category:** Questions about Thunkable X\
**Tags:** bugs, error\
**Created:** [January 29, 2022, 10:49am UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367 "2022-01-29T10:49:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hridoythebest](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hridoythebest/32/92061_2.png) [@hridoythebest](https://community.thunkable.com/u/hridoythebest)\
**Post date:** [January 29, 2022, 10:49am UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367/1 "2022-01-29T10:49:55Z")

</div>

I have a web viewer apps. Recently i have integrate Sign in with Facebook and Sign in with Google feature on my website. This is working fine on any browser but it’s showing error when i am trying to log in with Facebook or Google from my Apps. Besides When i am trying to log in it is always opening browser and asking to log in again to my Facebook or Gmail account again. But i have an active account logged in on my Gmail and Facebook Apps.  
 ![271563993_475428284196555_5843558881086120498_n](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/0/601f7b2ce17b6f2b947e890495bb52d6ac1c7a67.jpeg)

 ![272636884_1001473397426151_420449905817347598_n](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b97e448dbc78837bb258c3c2ff13cc9555ded519.jpeg)

---

<div class="post-metadata">

**Author:** ![tony.ycy.program](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tony.ycy.program/32/100153_2.png) [@tony.ycy.program](https://community.thunkable.com/u/tony.ycy.program)\
**Post date:** [January 29, 2022, 12:09pm UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367/2 "2022-01-29T12:09:54Z")

</div>

That’s because in-app browsers are not as secure as normal browsers, so third-party logins can’t be used, but you can use other methods to do sso.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 29, 2022, 1:01pm UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367/3 "2022-01-29T13:01:27Z")

</div>

The message clearly says that Google does not allow executing logins from `Web Viewers` or `iFrames`.

---

<div class="post-metadata">

**Author:** ![hridoythebest](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hridoythebest/32/92061_2.png) [@hridoythebest](https://community.thunkable.com/u/hridoythebest)\
**Post date:** [January 30, 2022, 3:28am UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367/5 "2022-01-30T03:28:44Z")

</div>

Thank you tony.ycy.program for you response  
Can you suggest me any other method ?

---

<div class="post-metadata">

**Author:** ![hridoythebest](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hridoythebest/32/92061_2.png) [@hridoythebest](https://community.thunkable.com/u/hridoythebest)\
**Post date:** [January 30, 2022, 3:31am UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367/6 "2022-01-30T03:31:13Z")

</div>

I have added SSO on my website and that’s working fine on any web browser.  
But when i am using my thunkable web viewer to build an app then i am facing this issue from web viewer.

Is there any solution from thunkable ?  
or any one had any idea how to solve this issue ?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 30, 2022, 3:44am UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367/7 "2022-01-30T03:44:16Z")

</div>

We’ve begun scoping the work for oauth internally. There are alternatives at the moment.

For example, running a backend server that hosts a redirect page you can redirect after sign in to a page with a button that copies the access code to the clipboard and instruct the user to return to the app. They copy paste the code in the app and you begin the next leg of all authwork which can be completed beyond the browser.

Publishing an app ^^ way though, I’m not sure Is publishable. Definitely works for a webapp.

At the moment, you just can’t use google for Facebook oauth in a web viewer. It’s not a Thunkable thing, it’s a them thing.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 30, 2022, 6:56am UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367/8 "2022-01-30T06:56:59Z")

</div>

> [@hridoythebest](#):
>
> any one had any idea

The error message you got is due to **CORS policy**. Google has this policy in their servers which prevent any authentication codes to run from an `iframe`.

You can test it yourself. create an HTML file with an iframe element and use the URL of the iframe the HTML page that you use to sign in. You will get the same error. This is a server restriction not a Thunkable issue.

---

<div class="post-metadata">

**Author:** ![tony.ycy.program](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tony.ycy.program/32/100153_2.png) [@tony.ycy.program](https://community.thunkable.com/u/tony.ycy.program)\
**Post date:** [January 30, 2022, 8:49am UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367/9 "2022-01-30T08:49:04Z")

</div>

> [@Google login in thunkable project](https://community.thunkable.com/t/google-login-in-thunkable-project/1685843):
>
> [[Thunkable Google login] ](https://www.youtube.com/watch?v=yivq2fhCkZc) I use google auth 2.0 and [neocities.org](http://neocities.org) and google app script (backend). Any questions please ask me below.

[![](https://img.youtube.com/vi/yivq2fhCkZc/maxresdefault.jpg "Thunkable Google login") ](https://www.youtube.com/watch?v=yivq2fhCkZc)

> [@Google login in thunkable project](https://community.thunkable.com/t/google-login-in-thunkable-project/1685843/5):
>
> \<!DOCTYPE html\> \<html\> \<head\> \<meta charset="UTF-8"\> \<meta name="viewport" content="width=device-width, initial-scale=1.0"\> \<script src="https://apis.google.com/js/platform.js" async="async"\>\</script\> \<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"\>\</script\> \<meta name="google-signin-client\_id" content="{yourClientID}"\> \<title\>Login with Google\</title\> \<link href="/style.css" rel="stylesheet" type="text/css" media="all"\> \</head\> …

> [@Google login in thunkable project](https://community.thunkable.com/t/google-login-in-thunkable-project/1685843/8):
>
> let ss = SpreadsheetApp.getActiveSpreadsheet(); const commandError = { "error": true, "errorMessage": "The command is invalid." } function doPost(e) { let sheet = ss.getSheetByName("user"); let userToken = e.parameter.token; let getId = e.parameter.getid; let url = "https://oauth2.googleapis.com/tokeninfo?id\_token=" + userToken; let response = JSON.parse(UrlFetchApp.fetch(url).getContentText()); if (response.error != "invalid\_token") { let googleId = response.sub; let em…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [April 30, 2022, 8:49am UTC](https://community.thunkable.com/t/unable-to-use-sso-single-sign-on-service/1703367/10 "2022-04-30T08:49:56Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
