I am trying to make a website, which hosts a form for employees to enter their shift details into. The website itself is pretty basic, meaning it is mostly just HTML and PHP code.
Obviously I need to control access and as of right now (the site is not live yet so there is no personal info etc. on there yet) I'm doing that by comparing the login input to the entries in my MySQL database, but since I'm sure this is not the best way of handling this and it would be easier for the user if he could just use his Microsoft credentials.
From what I have gathered, protocols like OAuth2.0/OpenID are used for this. Is this correct? How would I code something like this? Are there better alternatives? Where should I look to learn about stuff like this?
It would also be great if I could, besides just knowing the user is allowed in, get info about the user based on which I can make decisions (where they are redirected, what they can and cannot see etc.)