Making-Websites-With-October-CMS icon indicating copy to clipboard operation
Making-Websites-With-October-CMS copied to clipboard

Extending user plugin for authentication

Open shahramatrian opened this issue 5 years ago • 1 comments

I want to create a plugin to extend User plugin in a way it authenticates the users through an external API rather than what User plugin normally does. After successful login a cookie will be saved for user to be used for subsequent requests to the REST API.

The external service provider needs the username/password or a cookie to be sent with each request, so I want to use the cookie rather than saving user's credentials in a table. Can you please guide me?

I'm sorry if it's not the best place to ask such questions.

shahramatrian avatar Feb 12 '20 23:02 shahramatrian

Well, first of all this is not a trivial functionality, so I can't explain how to do that here. However we did something similar in this series: https://www.youtube.com/playlist?list=PLUBR53Dw-Ef9Wb7Wa8zn8kBu30HtsOKn8

Especially check episodes: 17, 20, 21, 22.

We are using REST API for our frontend app and authenticating users to October backend with JWT tokens.

Hope this can help you.

ivandoric avatar Feb 15 '20 08:02 ivandoric