demo-eleventy-serverless-oauth icon indicating copy to clipboard operation
demo-eleventy-serverless-oauth copied to clipboard

Proposed Provider: Stack Overflow / Stack Exchange

Open rubenrivera opened this issue 11 months ago • 1 comments

Documentation

  • https://api.stackexchange.com/docs/authentication
  • https://api.stackexchange.com/docs/me

Broad steps (to be validated)

  1. Get the app's OAuth Domain to be used on the app registration at https://stackapps.com
  2. Register the OAuth app at https://stackapps.com/apps/oauth/register and get the Stack Overflow Oauth client id and client secret.
  3. Add the STACKEXCHANGE_OAUTH_CLIENT_ID and STACKEXCHANGE_OAUTH_CLIENT_SECRET to the corresponding site on Netlify.
  4. Update providers.js and auth.js in netlify/functions/Utils
    • Add Stack Exchange to a new provider. Notes: 1. There are two domains to be used: https://stackoverflow.com for authentication and https://api.stackexchange.com to get the user data. 2. On Stack Overflow/Stack Exchange OAuth it is required to set a site name, i.e., stackoverflow, meta, webapps, etc. A basic setup might use a hardcoded site name. Ideally, the form should include a select so the user can select the source of the site user profile. Another approach might be to show the user data from the Stack Exchange network profile instead but this should be told to the user.
  5. Add a Stack Overflow / Stack Exchange login button to the static form.

rubenrivera avatar Mar 20 '24 19:03 rubenrivera

Update

I forked this repo and made some changes. I'm not ready yet to make a PR, but it works as a proof of concept.

Related

rubenrivera avatar Mar 23 '24 17:03 rubenrivera