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 7756749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:54:11+00:00 2026-06-01T12:54:11+00:00

I am successfully able to authenticate Facebook and Google accounts using my Oauth2 servlets.

  • 0

I am successfully able to authenticate Facebook and Google accounts using my Oauth2 servlets. I am using state with a timer and a session cookie to try to verify that it is indeed a legitimate Oauth callback.

  1. Is there any benefit if I also examine the HTTP Referer header to ensure that I was redirected from the provider’s OAuth page?

  2. If no benefit, could there be a problem if I also examine the HTTP Referer field?

  • 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-01T12:54:12+00:00Added an answer on June 1, 2026 at 12:54 pm

    The answer is:

    No, you shouldn't use it, and there is NO valuable benefit of doing it.
    

    Authorization Servers are very aware of this also. And here was stated.

    From the mailing list of OAuth-WG:

    Callback URL pages SHOULD redirect to a trusted page immediately after receiving the authorization code in the URL. This prevents the authorization code from remaining in the browser history, or from inadvertently leaking in a referer header.

    • If you are worry about CSRF, you SHOULD NOT use the HTTP Referer as a technique to verify the origin of an authorization, that’s why the parameter state is (which sound you’re using).

    • If you worry about an specific security concern of the oauth2 protocol, there is a full section inside the draft.

    • If you worry about other Security Considerations, this is the source.

    I suggest you give all your effort implementing all the validations around the param: state.

    Edit:

    After reading the nuances of the question, you are really answered your own question. The use of cookies (probably HTML5 local storage) for both cases, is the best solution we know so far.

    • The first nuance is about CSRF and one of the possible countermeasures available is Checking the HTTP Referer header, and this was already addressed in the protocol.

    • The second nuance, I’m not completly sure, but is probably a case of Extension Grant, this is because it sounds that you may work as an "auth proxy requester", same as SAML oauth2 extension.

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

Sidebar

Related Questions

First of all, I am able to successfully authenticate using Oauth. I am using
I'm using WSS4JInInterceptor to try to authenticate my client. I have been able to
Hi I'm able to successfully integrate iphone app with facebook framework. But I need
Using the following code, I'm able to successfully open a raw disk on my
Hi I am working on TCP/IP in Windows Azure and am successfully able to
What are the steps needed to successfully be able to remotely debug a stored
I've created my own WCF service and I've successfully been able to talk to
I am able to successfully call a function with ctypes in Python. I now
I am able to successfully execute this on windows: builder = new ProcessBuilder(cmd.exe, /c,
Has anyone been able to successfully unit test methods that are, by necessity, coupled

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.