Share to Google+ After Login With Google SignIn - ios

Before the Google SignIn API this is how I shared an image:
let shareBuilder = GPPShare.sharedInstance().nativeShareDialog()
shareBuilder.setPrefillText(someText)
shareBuilder.attachImage(anImage)
shareBuilder.open()
But now, after I sign in with the new API and try to share I get an error that says: "User must be signed in to use the native sharebox"
How can I fix this error?

Google+ SDK is deprecated.If you want to share to google +,you can only their way Basic sharing without signing in.However,I don't know how to share an image within their newest way.

Related

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

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...
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].
if you're using flutterfire ui package you need to change the client id parameter in your GoogleProviderConfiguration class with the iOS client id,
you can copy it from here Credential page
example:
providerConfigs: [
GoogleProviderConfiguration(
clientId: "your copied key here"),
]
re-build you're app and you should be good to go
I've just faced this same issue using flutterfire_ui on Flutter.
The error appears to be from a couple of things. As Valeriy points out you need the ios client ID. But I still got the error if I used the scopes
openid
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile",
Instead change these to
openid
email
profile
Strangely the opposite is true for Android, where the WebID and the first of the scopes should be used.
It also pays to be aware of the OAuth Content Screen..
In google cloud go to APIs & Services > OAuth consent screen > Edit.
You can add scopes here and fix any missing required fields that Firebase might not be filling out (I had 1). I believe this takes a while to propagate after a change, so give it an hour.

Firebase Login signIn Linkedin [duplicate]

I'm currently building an app and I would like people to be able to sign up with their LinkedIn account.
I'm using Firebase for the back-end and LinkedIn isn't currently supported by the FirebaseAuth framework.
I know Firebase allows Custom Auth System but even after reading the doc about this, I still struggle to understand how I can plug LinkedIn there and what the so-called authentification server is.
Has someone managed to make this work?
Thanks in advance for your inputs.
Firebase Authentication supports only four federated Identity Providers out of the box: Google, Facebook, Twitter and GitHub.
For every other provider you have to use custom tokens (you will need an external Webservice).
You can read more here for a full example (the link is for Instagram but it will also work for LinkedIn as they say).
See this example in official Firebase repo: Use LinkedIn Sign In with Firebase
In this sample we use OAuth 2.0 based authentication to get LinkedIn
user information then create a Firebase Custom Token (using the
LinkedIn user ID).
Looks like the post is few years old, so not sure if you have found the solution, but for the benefit of everyone. in the current version of firebase, this is how I was able to use LinkedIn.
export function signUpWithLinkedIn() {
return auth
.setPersistence(firebase.auth.Auth.Persistence.SESSION)
.then(()=>{
const provider = new firebase.auth.OAuthProvider('linkedin.com');
provider.addScope('r_emailaddress');
provider.addScope('r_liteprofile');
auth
.signInWithPopup(provider)
.then(result=>{
console.group('LinkedIn');
console.log(result);
console.groupEnd();
return result;
})
.catch(error=>{
console.group('LinkedIn - Error');
console.log(error)
console.groupEnd();
throw error;
});
});
}

FacebookLogin loginWithReadPermissions does not request any new permissions

Ive previously requested public_profile, user_friends, and email which Facebook will let you use pretty freely in my Swift iOS app but now I'm trying to update the app to request new permissions with loginWithReadPermissions but when it transfers to the login page it just says that I've already granted my app permission and doesn't request the new permissions. Querying the results shows no granted or denied permissions and looking at the Graph Explorer API on the Facebook Developer site shows the same. So I'm looking for suggestions on why my app might not be sending the updated request to the server.
I should note that I'm utilizing the AWS iOS Mobile SDK. I found another answer that overwrites the default Facebook sign in provider to add new permissions to the request but this has the same result.
Also in my output Im seeing the following string which contains all the permissions Im trying to request which makes me think that the request is going out but something else is happening
scope=email%2Cuser_birthday%2Cuser_hometown%2Cuser_friends%2Cpublic_profile%2Cuser_about_me

Update thumbnail without asking for google login - Youtube API V3.0 - OAuth2.0 -

My goal is quite simple : Use php files that will log on my youtube account and upload custom thumbnails.
I already successfully used Youtube API V2 to upload videos with no problem,
but the V3 requires OAuth2.0, and I can't found a way to avoid my server keeps ask me "Please login from your google account"
I use the example from the official place, here :
And created my OAuth token (tried web application and service) but it keeps ask me to log in...
I only want the php files to log on alone, because I want to share them to some friends that will be able to change thumbnails without having a google acount or knowing my youtube/google password.
You can do so by getting a refresh token from OAuth2 Playground and setting it in your youtube object.
Here it explains a little more.
And a step by step video.
Thank you Ibrahim, it solved my problem :) !
Except you didn't mentionned that I had to use $client->refreshToken('Refresh Token'); and then start the conditional : if ($client->getAccessToken()) { [...] . Very important to the others one who could encounter the problem : You need to use google developper console https://cloud.google.com/console and specify in APIs & Ath > Credentials the exact adress of your PHP script, and set a product name and email address in Consent Screen.

Box Authentication for v2?

To Authenticate the app , simple way is I get a ticket by this method "GET https://www.box.com/api/1.0/rest?action=get_ticket&api_key=" and finally " https://m.box.com/api/1.0/auth/ " the url open up the login page in safari, it was easy in v1 iOS SDK.Now I could not able to authenticate after entering credentials and clicking login I cannot enter into my application. I have been facing authentication issue. How to authenticate using new iOS SDK v2 ?
What error u getting?
Also Try using POSTMAN Google chrome extension to do the authentication as a command line and try to implement on your real app, u will find supportive docs on Box website. Make sure all your parameters are correctly entered.

Resources