Custom scheme URIs are not allowed for 'Web' client type - Google with Firebase

折月煮酒 提交于 2020-01-03 17:11:20

问题


I am trying to implement google sign in using firebase in to my iOS app. I follow this tutorial. https://firebase.google.com/docs/auth/ios/google-signin I have setup the iOS app in firebase and use the google clientID and reversedClientID from the dowloaded GoogleService-Info.plist.

FYI: I have a custom sign-in button instead of the google sign in button. Anyway when i click the sign in button, google following error display in a webview.

I know my problem is the same as which described in this question.

Google 400 Error: invalid request Custom scheme URIs are not allowed for 'Web' client type

But, in my case, I have created the app in Firebase still I get the error. Any idea please...


回答1:


The first step is to check if you have already the OAuth 2.0 ID for iOS. To do this please open the Credentials page in the API Console. I hope you will find iOS client for your application under OAuth 2.0 client IDs section. If not, please follow this Guide The second step is to replace the Web Client ID with in iOS Client ID from OAuth 2.0 client IDs section. To do this, you should open the GoogleService-Info.plist and modify following keys: CLIENT_ID with [value].apps.googleusercontent.com and REVERSED_CLIENT_ID with com.googleusercontent.apps.[value].



来源:https://stackoverflow.com/questions/43060912/custom-scheme-uris-are-not-allowed-for-web-client-type-google-with-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!