¶ ↑
READMEThis app is an example of using Sorcery to provide basic authentication & sign up for your app, and using the external module within Sorcery to add provider-specific authentications (i.e. Twitter, Google). This app also assumes you do NOT need Sorcery to login or sign up to your app from any provider.
After a normal user login, the app will prompt the user to authenticate with Twitter or Google, and save an oauth access token for future use of the API’s. Bear in mind, each API will handle access differently. For example, during the OAuth process, Twitter issues an access token which does not expire. Google’s access token however, will expire after 60 minutes, requiring you to use a “refresh token” to regain access.
Notes:
-
Be sure to the application and appropriate settings in Twitter or Google developer area
-
Before going into production, you should encrypt the access tokens