Github register a new oauth application

Here's a step-by-step guide on how to register a new OAuth application on GitHub:

Step 1: Go to the GitHub Developer Settings

  1. Log in to your GitHub account.
  2. Click on your profile picture in the top right corner, then select "Settings" from the dropdown menu.
  3. Click on "Developer settings" from the left-hand menu.

Step 2: Click on "New OAuth App"

  1. Click on the "New OAuth App" button.

Step 3: Fill in the Application Information

  1. Fill in the required information for your application:
    • Application name: Give your application a name (e.g., "My GitHub App").
    • Authorization callback URL: Enter the URL that GitHub will redirect users to after authorization (e.g., http://example.com/callback).
    • Application description: Provide a brief description of your application.
  2. Click "Register application" to create the application.

Step 4: Generate a Client ID and Client Secret

  1. GitHub will generate a Client ID and Client Secret for your application.
  2. Make a note of these values, as you'll need them to authenticate with GitHub.

Step 5: Configure the OAuth Scopes

  1. Under "OAuth applications", click on the "Edit" button next to your application.
  2. Scroll down to the "OAuth scopes" section.
  3. Select the scopes you want to request from users (e.g., repo, read:org, write:public_repo).
  4. Click "Update" to save your changes.

Step 6: Use the Client ID and Client Secret

  1. Use the Client ID and Client Secret to authenticate with GitHub and request access tokens.
  2. You can use the Authorization header with the Bearer scheme to authenticate with GitHub, like this: Authorization: Bearer YOUR_CLIENT_ID.

That's it! You've successfully registered a new OAuth application on GitHub.