GithubHelp home page GithubHelp logo

google-apis's Issues

Token expired

How i can refresh the token when expired? I want to show the login UI only the first time the user access.

the call is ambiguous between the following methods

untitled

my solution if is ok:

var attributes = property.GetCustomAttributes<Google.Apis.Util.RequestParameterAttribute>();            
                if (attributes != null && attributes.Count() > 0)
                {
                    var attribute = attributes.ElementAt (0);
                    string name = attribute.Name ?? property.Name.ToLower();
                    object valueObject = property.GetValue(this, new object[] {} );
                    string value = String.Empty;
                    if (valueObject != null)
                    {
                        value = valueObject.ToString();
                    }

                    requestBuilder.AddParameter(attribute.Type, name, value);
                }

Google signin crashing on phone but works on simulator

My SignIn method is as follows:

 public void SignIn()
 {
     Debug.WriteLine("In SignIn");
     if (GdAuthenticator == null)
     {
         (App.GdClientId, App.GdRedirectUrl, App.GdClientSecret) = App.SetIDs4GoogleDrive();
         Debug.WriteLine($"GdRedirectUrl: {App.GdRedirectUrl}");
         GdAuthenticator = new OAuth2Authenticator(
             App.GdClientId,
             App.GdClientSecret,
             App.GdScope,
             new Uri("https://accounts.google.com/o/oauth2/v2/auth"),
             new Uri(App.GdRedirectUrl),
             new Uri("https://www.googleapis.com/oauth2/v4/token"),
             isUsingNativeUI: true);
         GdAuthenticator.Completed += Auth_Completed;
         AuthenticatorHelper.OAuth2Authenticator = GdAuthenticator;
     }
     // This flag is set here as for iOS, AppDelegate.OpenUrl is invoked even before
     //    this.Auth_Completed event is invoked and this flag is needed to redirect
     //    to this app after authentication
     if (Device.RuntimePlatform == Device.iOS)
         App.StorageServiceSignedIn = App.StorageServices.GoogleDrive;
     OAuthLoginPresenter presenter = new OAuthLoginPresenter();
     presenter.Login(GdAuthenticator);
 }

GdScope is set as follows:

public static string GdScope = "https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file";

The error occuring is:

System.UnauthorizedAccessException
Message=Access to the path '/private/var/mobile/Containers/Data/Application/FE509305-6324-4705-B517-DA2A98B18A69/.local/share/google-filedatastore/Google.Apis.Auth' is denied.

I don't find any line containing "FE5" in the device logs.

The Publishing Status of my app on Google API site is "Testing".

Since it is not failing on the simulator I assume that all authentications are in order. The app is run on iPhone 6 in Debug mode.

I published the app to App Store after testing in Debug mode but never tested on device in Release mode. But I found the issue after users facing crash issue while signing into Google Drive services that I am using in the app.

Let me know if you need any further info.

ThanQ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.