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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:05:59+00:00 2026-06-12T16:05:59+00:00

A lot of apps keep user logged in until user manually logs out like

  • 0

A lot of apps keep user logged in until user manually logs out like facebook, dropbox, etc.

I am wondering how they achieve it? There might be several approaches:

1)Do they store the username and password in a local storage, and automatically log the user in when they open the app again after a long time?

2)Or do they get a long-lived token from the server, and once the user login at very first time, the app gets a token from the server, later on they just use the token? The token will be valid until user manually logout from the app.

For #1, it will only work for native login, if an app supports “log in with facebook or twitter” it won’t work.

So I just want to get an idea about how people achieve this feature? Is there any articles talk about it?

  • 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-12T16:06:00+00:00Added an answer on June 12, 2026 at 4:06 pm

    Most services like Facebook and Twitter use OAuth to manage the user session.

    I use this external framework… https://github.com/nxtbgthng/OAuth2Client

    It took me a while of reading and setting up to get right but it works now.

    When the user logs in they get an auth token that contains an expiry date. When the expiry date comes the system automatically refreshes the token.

    When I send a request to the server I send it via the OAuth framework and it adds the authorisation automatically.

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

Sidebar

Related Questions

I've got a lot controller in my Codeigniter apps, ex: Signup, Profile, Main, etc..
I find that writing web apps and WinForm apps generally come out a lot
I have been experimenting with a lot of web development apps like Drupal, Moodle,
in my server I have a lot of apps installed like, facebook_connect, userena, guardian
I have a lot of apps published using the FB android sdk github.com/facebook/facebook-android-sdk All
A lot of apps pop up a transparent view with rounded corners and an
I know a lot of apps give you some sort of bonus when you
There are a lot of iOS apps in the iTunes Store that, upon launch,
A lot of users on one of our online apps complain about the app
I have a lot of experience writing Delphi 6 Pro apps using the Skype

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.