Is it possible to customize the Authentication in Strapi with three fields (username/pwd/location)?

338 Views Asked by At

Requirement is to disable the Strapi authentication and use our custom AUTH(call internal API to fetch a internal custom ROLE). All the users will act as admin if role matches the role. We will not be storing any users in STRAPI.

Admin user would login using custom AUTH with 3 inputs. I want to use an internal API to validate the users by by-passing Strapi authentication.

Is it possible to achieve this usecase?

2

There are 2 best solutions below

1
mainak On

you can do that, so without auth you will have isConfirmed as false and you can set a default role for users, that being said users needs to add in user table no matter what

Hope that helps!

0
Paul On

You can create your own custom auth provider. Really depends on what your implementation will look like. But you can checkout this article to get some ideas of how to go about it.

https://strapi.io/blog/how-to-add-a-custom-o-auth2-open-id-connect-provider-to-strapi-v4

You can also extend Strapi auth to customize to fit your use case. Which will also be based on what you are looking to do.

I think creating a custom provider will be your best bet based on what you described.