Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8199177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:07:05+00:00 2026-06-07T06:07:05+00:00

What is the point of using OAuth 2.0 client-side authorization in Android if built-in

  • 0

What is the point of using OAuth 2.0 client-side authorization in Android if built-in WebView browser doesn’t have access to cookies of default user browser? I mean, if I open some oauth-url (e.g. http://blablabla.com/authorize?client_id=APP_ID&redirect_uri=REDIRECT_URI&response_type=token) in WebView – the user will anyway be prompted to enter his credentials to sign in to “blablabla.com” social network. Because even if he is already signed in with some of his browsers (Opera or Dolphin, or default browser), the WebView browser doesn’t know anything about corresponding cookies.


EDIT:

I’ll try to make it a bit clearer.

The main goal is to simplify sign-in procedure in my application. I’d like to implement such mechanism that we can see on many web-sites: “Login with… Facebook/Google/Twitter/whatever”. And in desktop browser that approach works perfectly, because the end-user is already signed in to aimed service WITHIN THIS BROWSER. So basically to sign-in in to my site all he needs is:

  1. Press button “Sign in with…”
  2. On redirected window/popup press
    “Approve/Confirm”.
  3. Get redirected back, already being signed-in.

The main benefit is that user doesn’t need to enter his email/name/whatever – I’ve already extracted it from his social-network account.

And I’m wondering how to get same effect on Android. The problem is that, as I can see, we can’t let user avoid entering password, because the application (WebView) never knows if he is signed-in to some outer service or not. That’s why user anyway will be prompted to enter some of his details and all of OAuth benefits become annihilated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:07:06+00:00Added an answer on June 7, 2026 at 6:07 am

    The workaround depends on what you are trying to do. It’s not clear to me, looking at your question again, because you do not explain your use case. Instead you are indirectly asking for something that looks very broad as if you want to maintain an Android system-wide login state that spans over multiple applications using shared cookies.

    Due to security reasons that is neither good nor wanted. A rogue app could do whatever it wants to do with existing access tokens requested by other apps or just temper with or read existing cookies created and maintained in other apps.

    Assuming you are trying to authorize your own app access to a web service using OAuth 2.0 by letting the user log in with a WebView, you need to implement your own WebViewClient, override its onPageStarted or onPageFinished method and check whether the URL argument matches your redirect URL.

    If there is a match you need to extract the access token from the URL string. If there is also a refresh token available, then extract that one, too.

    (This however only works for a certain type of OAuth flow, which adds the access token to the redirect URL.)

    Now you have at least an access token available. Store that token in the private preferences of your application and use it in your service requests until you get a 401 not authorized error message back from the service. At that point you can use the refresh token if available to request a new access token or you have to show the login WebView again.

    If you are trying to access a Google service from your app you may find the article Getting started with the Tasks API and OAuth 2.0 useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Share Point Designer 2010. I want to conduct client side validation (jquery) but
I have an Android client that needs to authenticate with a python Google App
While following this tutorial on using OAuth 2 with the Android AccountManager, I'm told
I'm using clj-oauth for a school project where I am creating a desktop client
What's the point using this syntax div.card > div.name What's the difference between this
What is the point of using the ampersand in wxPython? I see it in
what's the point of using ant, maven, and buildr? won't the using build in
Obviously the point of using named constants over magic numbers is for code clarity
What's the point of using : int in the enum declaration as following? public
I don't see the point of using either http://960.gs or http://blueprintcss.org if they enforce

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.