Comments (17)
This doesn't happen with the sample.
from simpleauth.
@Clancey yes but sample uses google.Authenticate()
, that works for me too, can you please try it with google.Get("https://www.googleapis.com/oauth2/v1/userinfo?alt=json");
from simpleauth.
Still works for me. Does it work for you in the sample?
from simpleauth.
It works for me too in the sample.
The problem is that in my app,
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
SimpleAuth.Native.OnActivityResult(requestCode, resultCode, data);
}
is called 3 times instead of just 1, I'm not sure why.
from simpleauth.
Try checking the data, see what is passed in, are the all the same?That shouldn't cause any weird artifacts.All the callbacks come from outside my realm. I can't control theOnActiviytResult
from simpleauth.
Hi,
I got the same problem (flashing 3 times) today by mistake.
I got the problem when I try to pass a "ClientSecretID" to GoogleAPI constructor like :
var ClientSecretID = "YDS2t7_w8A8SQ15P1RMVfAzy"
var api = new GoogleApi("google", GoogleClientId, ClientSecretID)
but the problem been solve when I use the hardcoder value "GoogleApi.NativeClientSecret" as :
var api = new GoogleApi("google", GoogleClientId, GoogleApi.NativeClientSecret)
Hope it can be usefull
(my English isn't as good as I want)
from simpleauth.
@Kevvix , so you're saying that I should try something like this
var api = new GoogleApi("google", GoogleClientId, "YDS2t7_w8A8SQ15P1RMVfAzy")
I'll try that on Monday, thank you for your response.
from simpleauth.
using api = new GoogleApi("google", GoogleClientId, GoogleApi.NativeClientSecret)
instead of api = new GoogleApi("google", GoogleClientId, GoogleSecret)
fixed my problem.
@Kevvix, @Clancey thank you.
from simpleauth.
I will dig in a little more and see if I can find the issue.
from simpleauth.
I still cannot reproduce this. I have tried exactly as you guys have said, Also there is no difference between
api = new GoogleApi("google", GoogleClientId)
and
api = new GoogleApi("google", GoogleClientId, GoogleApi.NativeClientSecret)
from simpleauth.
I'm not sure why it works, but it works.
Also I'm using MainPage as login page, not App.cs like sample.
Rest of the code is pretty much the same as one in the sample.
from simpleauth.
@Clancey have you tried it like this?
string googleSecret = "some secret";
string GoogleClientId = "some client id";
api = new GoogleApi("google", GoogleClientId, googleSecret);
from simpleauth.
Yes I did. Still can't duplicate. So you want to try and debug it?
from simpleauth.
@Clancey can you explain me how can I use refresh_token to obtain new access_token once the old one expires (in 1hour) ?
from simpleauth.
You don't have too. The lib shows it for you. Just make a web call or manually call API.Authenticate();
from simpleauth.
@Clancey thank you for your response.
The problem is I'm not supposed to prompt user to login again.
I have a periodic task that executes at some period in background and it requires account.IdToken.
Is there any way to automatically use refresh_token to obtain new tokens ?
from simpleauth.
If you don't pass in the web server client secret, the native google deals with all refreshing. SimpleAuth will ask them for the new token, and sometimes they will show the UI. If you do the secret, it will auto refresh perfectly.
from simpleauth.
Related Issues (20)
- "Missing redirect_uri parameter" error with Xamarin.Forms UWP sample
- Determine if Google Sign-In is cancelled HOT 2
- Google Sign-in unintentionally cancelled and logs "Java.Security.UnrecoverableKeyException: no match"
- UIWebView is deprecated HOT 2
- SimpleAuth.Google.Droid and Sample.Droid do not reference the same GooglePlayServices version
- WebAuthenticatorWindow in iOS 13 is displayed as pageSheet HOT 2
- Google doesn't exist in SimpleAuth.Providers HOT 1
- Back end google token validation
- GetCFBundleURLSchemes only returns first URL scheme of Info.plist (MacOS)
- Google signin for Flutter windows? HOT 2
- Support for hd (domain hint) parameter for Google Sign In / tenant ID for Microsoft sign in HOT 1
- Google Sign In crashes on Android 8.0 (documentation issue)
- Login disabled on facebook
- Api.Get<T> method does not lend itself to supporting error responses HOT 1
- Google_GoogleSignInProvider not implement onConnectionFailed HOT 3
- Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. HOT 1
- Sample.Mac Doesn't work on 10.11 and 10.12 HOT 4
- Instagram SignIn UI Issue on UWP HOT 3
- Need Proper Documentation HOT 1
- Instagram Authentication on MacOS - NSURLErrorDomain error -999 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpleauth.