Xamarin.Auth Google Logout - forms

I have a Xamarin Forms project that uses Google Authentication as described here. I can log in fine, but I can't figure out a way to truly log out of Google. The Google accounts are stored in the browser, so when I use the Presenter to display the Choose an Account list from Google, the passwords don't need to be entered. Is there a way to force the user to enter their google password every time?

If your open to switching to a different solution to OAuth. I have used the Simple Auth Package. It provides a method to log out. The documentation provides a fairly easy implementation. Once you have the log in set.Use ResetData(); to log out.
I know this does not answer your question exactly but it would be a possible solution.

Related

Make own authorization page to access Google Apps

I hope you can direct me with my query.
I wish to create my own authentication method for users in my Google Apps for Work account. Currently I am using built in Google Authentication, however I wish to build my own authentication method in PHP, Phyton or .NET; language doesn't matter really. So I want users to go to the page I will create, then they will need to pass authentication and be logged to Google Apps.
I know SSO is the way to do it but after my research I found very little about how to achieve it with Google Apps. I mean there is tones of third party platforms like OneLogin etc but I would like to have something I build myself. Ideally I would like to have some examples of SSO which works with GAFW so I could figure out the rest myself. I read somewhere that building own SSO portal it's not a piece of cake and also found an article that you can create something based on oAuth2.0 instead. So tried research about oAuth2.0 but all documentation I found is about authenticating to the application that I build using Google Apps Credentials, where I want the opposite; to be able to access Google Apps using the app that I build.
Hope someone could direct me to some examples or documentation or explain the process of learning curve to get my head around this project of building SSO for GAFW.
If you want to write your own Auth system and become the Identity Provider (IdP), you need to use SAML as that is the only supported method for now.
Here are the step by step instructions

Moodle and Google SSO

My school is looking to use moodle as an LMS and integrating it with google apps. What I would like to implement in the integration is a single sign on where once a user is logged into google apps, they would immediately be logged into their moodle account. I want this to also be possible vice versa where a user would also be automatically logged into their google apps account if they login to moodle instead. So far the plugins I have found can only do one or the other; not both (or perhaps I do not know how to configure them this way).
I have tried using googleoauth2 and GSAML but had no luck. Can someone please help or guide me somewhere that has this implemented?
Thanks you
THe process is well-documented here: https://docs.moodle.org/29/en/Google_Apps_Integration
The OneLogin plugin (among other options) supports both SSO and Google Apps. I would suggest starting there.
The exact documentation (should you choose to proceed with this login) can be found here. You will need OpenAM as well.

Get user OpenID URL without user interaction

I have an packaged app in the Chrome Web Store that I'd like to transition from a paid app to a free one with in app purchases. I need to be able to detect if the current user had paid for the app previously.
To be able to use the licensing API, I need the current user's OpenID URL. I was able to get this to work using chrome.identity and a popup dialog that the user has to authorize. But it is a bad experience and kind of a scary dialog.
For hosted apps, it's possible to get the user's OpenID URL without any user interaction or authorization. (see How to skip the OpenID approval screen). It would be fantastic if somebody knows how to make this work without user interaction for packaged apps.
I've detailed some of the approaches I've tried on this chromium-apps thread. I suspect it may be possible to do this with chrome.identity.launchWebAuthFlow but I wasn't able to discover the exact incantation of parameters to google's oauth/openid endpoints to make this happen silently.
I think you need to refer to this Link1 Parameters
this parameters are different techniques using that you can do this task..
also To bypass the Login/approval screen refer this link2
Here in the section How to skip the OpenID approval screen the details are explained which you can use..
And In case of packaged app this should ask for permanent permission that will help in OAuth throughout the life of app..
Client Library JavaScript Based
Authentication using Library
After your comment I thought this you can bind in your app.!!
Let me know what works for you..

How implement Facebook-Login / facilitate site-register using Facebook

I want my users to be able to login or register on my Site using their Facebook-Account. Could be either like the user clicks the "Login using Facebook"-Button and is automatically logged in, while his data is saved to the db or he clicks "Login using Facebook" and gets my register-page filled with his data from Facebook.
I already tried the Facebook-register, but I think it doesn't solve the problem for me, because I don't want to change my entire register-dialog to Facebook. I want it additionally.
I managed to generate the "Login using Facebook"-Button using the Java-API. I also managed to get user-data via FQL using the PHP-API. But then I run into huge problems with the token.
I guess I read the (poor) documentation on FB-Developers for 20 times now. The Tutorials I found where either outdated or treat other cases. Besides that seemingly everyone uses another way to access FB.
Does anybody know an easy way to realize that and could clearly explain which functions, APIs, ... to use? Especially I feel like I still haven't totally understood that token-thing.
If someone is stuck with the same problems... For me it helped a lot to drop the JAVA-API and only rely on PHP.
See as well this tutorial: http://thinkdiff.net/facebook/php-sdk-graph-api-base-facebook-connect-tutorial/ (It's also a bit outdated, therefore you have to delete the call to the getSession-Method.)

Twitter + SAOAuthTwitterEngine

So, I have been reading into the whole OAuth stuff the recent days, trying to find something to help me authenticate with twitter. Since most of the topics in this forum pointed to Ben Gottliebs Framework I tried to include it in my TestApp which went fine.
Inserting my tokens, logging in went easy. Next thing I wanted to do, was using my own login screen. So I have to replace the Webview which is used with my own (e.g.) UIView.
The thing is, I couldn't find out how to do that. I have absolutely no idea at what point 'interfere' since everything is so obscure (on purpose?)...
So my questions are:
1) Has anyone approached the issue in any way and can you give me a hint on what there is to do?
2) Is is generally ok to change the framework in that way? I couldn't find anything which would prohibit me of doing that...
The whole idea behind OAuth is that you don't provide the login screen. That way, the user doesn't have to give you his password. Instead, he is taken out of your app temporarily, passed to Twitter (or Facebook, or whatever), authenticated with them, and then Twitter (or Facebook, or whatever) gives you a token that you can use for as long as the user still gives you permission to use it.
That all being said, Twitter does actually provide a way for you to customize your own login screen, called xAuth. However, you need special permission from Twitter to get access to create an xAuth app.
Information about xAuth: http://dev.twitter.com/pages/xauth
Another Question about this: #iPhone : how to create twitter + OAuth custom login in our application