Add a Custom OAuth2/OpenID Connect Provider to Strapi v4

I have successfully authenticated with the custom provider, in my case it is Autodesk. I followed the above documentation and followed additional steps for integration.

  1. Add postinstall script to package.json : In your package.json file, add the "postinstall": "patch-package" script. This script ensures that patch-package is run automatically after npm installs your dependencies.
  2. Install Dependencies and Patch Changes : After adding the postinstall script, run npm install to install the dependencies and automatically patch any changes using patch-package.
  3. Update Frontend URL Rewrite : Ensure that your frontend makes requests to the appropriate endpoint for the custom provider. In my case, it’s important to call http://localhost:1337/api/connect/autodesk for the Autodesk provider.
  4. Ensure that the custom provider’s GET request in providers-registry.js
    matches the provider documentation’s routes.
1 Like