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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:41:50+00:00 2026-05-26T05:41:50+00:00

So, simple question: After the user authorizes my app (OAuth 2.0), i do a

  • 0

So, simple question:

After the user authorizes my app (OAuth 2.0), i do a call to the Facebook Graph API to fetch their details.

So at this point in time, i have their Facebook ID, an access token for API calls, their email, and some other basic info.

I’m working on an ASP.NET MVC 3 web application, that uses Forms Authentication and a custom ticket to store extra data.

A lot of examples i’ve seen has shown storing the info in Session.

Is this wise? Because i’m working on a single-sign-on (e.g users can “sign in” to my website with Facebook Connect), i only really “care” about their Facebook info if they are already logged-in to my website.

With that in mind – i’m wondering if it’s worthwhile segreating the info across different persistence mechanisms.

For instance, since the Facebook ID doesn’t change, i could store that in the Forms Authentication ticket, and perhaps store the access token in a cookie, with the expiry set to the expiry received in the HTTP response.

How do people go about storing Facebook information in an ASP.NET (MVC – but not specifically limited to) application?

  • 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-05-26T05:41:51+00:00Added an answer on May 26, 2026 at 5:41 am

    I decided to use a mix of Session and the Forms Auth ticket.

    In the ticket, i store the user’s Facebook ID, as this does not change.

    However, i also need to store if the user is currently authenticated to Facebook (just a basic flag) and the OAuth token.

    It doesn’t make sense to store this data in the cookie, because if they logged out of Facebook or the OAuth token expires, i’d then either have to update the cookie or sign them out of Forms Authentication.

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

Sidebar

Related Questions

This seems to be an embarrassingly simple question, but, after a day of reading
This is probably a really simple jQuery question, but I couldn't answer it after
I'm trying to make a simple three question quiz in php. After the user
I have what I know is a simple question, but after many searches in
Well looks too simple a question to be asked but i asked after going
Simple question that keeps bugging me. Should I HTML encode user input right away
I have a very simple question: After data are inserted, they will (anytime) be
This question might appear very simple, but i haven't found an answer yet, so
I posted a question similar to this earlier, however, after thinking about it and
Here is very simple question for experienced Git user. I've created repository on git

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.