Difference between revisions of "Auth: Twitter"

From Lorekeeper Wiki
Jump to navigation Jump to search
Line 18: Line 18:
 
==Registering your Application==
 
==Registering your Application==
 
This section is incomplete pending more thorough documentation of the application registration process.
 
This section is incomplete pending more thorough documentation of the application registration process.
 +
 +
The Twitter developer portal can be accessed at https://developer.twitter.com/en/portal/dashboard.
 +
 +
# (OPTIONAL) Click "Create Project".
 +
## Give your project a simple but descriptive title, such as "Sitename" or "Sitename Lorekeeper".
 +
## Select a use case; "Doing something else", for instance.
 +
## Describe your project.
 +
##* An example description could be something like "Allow users to authenticate with Lorekeeper site using Twitter through the Laravel Socialite system."
 +
## Add an existing app or click "Create a new app instead".
 +
# Create your application. If you have not made a project, you may instead click "Projects & Apps" in the sidebar, then "Overview". Click "Create App" on this page.
 +
## Give your app a simple but descriptive title, such as "Sitename" or "Sitename Lorekeeper".
 +
## You will be shown your API Key, API Secret Key, and Bearer Token. These will only be shown now, so save them for use in your .env file.
 +
##* <br />ur API key is your client ID, while your API secret key is your client secret.o
  
 
#Make Project
 
#Make Project

Revision as of 14:16, 5 May 2021

The instructions on this page are currently incomplete.
Please see the content of the page for reasons why. If you believe you can help, please contact an admin or moderator via the Discord server.


In order to create an application for authentication using Twitter, you must first apply for a developer account.

Apply for a Developer Account

The developer account application portal can be accessed at https://developer.twitter.com/en/portal/petition/use-case.

  1. Select "Hobbyist" and then "Exploring the API".
  2. You will be asked for basic information about yourself. Fill this out as appropriate.
  3. You will be asked to describe how you will use the Twitter API and/or data.
    • Following is a sample text explaining Lorekeeper's use case; you may want to paraphrase this.
    • "I want to allow my users to authenticate using Twitter through the Laravel Socialite system. My site uses social media to verify the identity of users and/or to display their identitie(s) on said social media to other users, and I would like to provide Twitter as an option for my users."
    • Uncheck all the options below.
  4. Review your answers and make any necessary adjustments.
  5. Review the developer agreement & policy. Agree as you feel appropriate. If/when you are ready, submit your application.
  6. You may be asked to verify your email; do so and the application review will begin.
  7. Wait for review. You may be asked for further details; provide these as appropriate.

Registering your Application

This section is incomplete pending more thorough documentation of the application registration process.

The Twitter developer portal can be accessed at https://developer.twitter.com/en/portal/dashboard.

  1. (OPTIONAL) Click "Create Project".
    1. Give your project a simple but descriptive title, such as "Sitename" or "Sitename Lorekeeper".
    2. Select a use case; "Doing something else", for instance.
    3. Describe your project.
      • An example description could be something like "Allow users to authenticate with Lorekeeper site using Twitter through the Laravel Socialite system."
    4. Add an existing app or click "Create a new app instead".
  2. Create your application. If you have not made a project, you may instead click "Projects & Apps" in the sidebar, then "Overview". Click "Create App" on this page.
    1. Give your app a simple but descriptive title, such as "Sitename" or "Sitename Lorekeeper".
    2. You will be shown your API Key, API Secret Key, and Bearer Token. These will only be shown now, so save them for use in your .env file.

      • ur API key is your client ID, while your API secret key is your client secret.o
  1. Make Project
  2. Make App
    • Include the callback URL
  3. Set up 3-legged OAuth

Connecting to Lorekeeper

This section is incomplete pending more thorough documentation of the connection process.

In your .env file, add the lines:

TWITTER_CLIENT_ID=your_client_id_here
TWITTER_CLIENT_SECRET=your_client_secret_here

Replacing the client_id and client_secret with the ones from your application.