Vishnudev Krishnadas
Vishnudev Krishnadas

Reputation: 10960

Nodejs multiple authentication

Iam building a School Management web application and wanted to include multiple authentication.

My idea is first to authenticate the school and then the users such as admin,teacher and staff of that particular school.

Is there any way to implement this using nodejs and express. By the way I have used passport to authenticate a user already (without school authentication) and want to build upon that.

Am I wrong to think of having multiple nested authentication? And how would I go about implementing if possible?

Upvotes: 0

Views: 1351

Answers (1)

Chandra Eskay
Chandra Eskay

Reputation: 2203

Multiple authentication is redundant. You can use single authentication and role based access to ensure right resources are accessed by right person.

In your case no need to authenticate a school. Just authenticate the user, check which school the user belongs and allow access to those resources.

Upvotes: 1

Related Questions