I'm having some problems on figuring this out:
I have currently made a website using PHP and MYSQL where users sign up/login.
I'm now trying to make some API so I can use GET to get if my user is signed in and their username.
The problem I've mainly encountered was the fact that as far as I know, using GET is not client sided and would not return me the users status (logged in or not & user)
I'm trying to do this because I'm going to have multiple sites linked to this authentication system.
I'm open to any suggestions.
Edit: (Adding more context)
Basically, I have one site (the main site) where people authenticate and create accounts. Their data is sent to a MySQL database.
On the other side, there’s another site. That site needs the users username (because I’d like to show it) and if they are not logged into their account on the first site, I want the second site to redirect them to the first site where they eventually create and account or login.
I’m also going to give an example where this is used. Let’s take Microsoft, they have their Microsoft accounts and a login page, and other services such as azure and office. They all use Microsoft’s original login without them needing to login each time they open that service, nor even the first time if they are already logged into their Microsoft account.
source https://stackoverflow.com/questions/69712758/authenticating-a-user-without-asking-for-credentials-using-php
Comments
Post a Comment