authentication for all gosher studios trademark software starting now
If you're looking to become a user, follow these steps:
-
Create an app by sending a POST Request to the
URL/meow
endpoint with the following parameters:name
: Your desired app name.url
: The callback URL formatted ashttps://url.com
.
Note: Ensure that the
url
parameter is correctly formatted ashttps://url.com
for it to work properly. -
After successful creation, the hoster will receive a secret which will be outputted to the console.
To log in a user, follow these steps:
-
Redirect the user to
url/?appid={your app's name}&secret={your secret}
.- Note: Using the secret in the URL is considered slightly unsafe; it will be addressed in future updates.
-
The user will be redirected to
{callback url}?id={id}
. Thisid
represents their current session ID, which will remain valid for 14 days. You can store it as a cookie or in local storage.
To verify if a session is still valid, send a GET Request to the URL/auth
endpoint with the following parameters:
ssid
: Session IDsecret
: App secretname
: App name
If the request is successful, it will return a status code 200
with the body containing the username of the user and the name of the app from which the session was created . If not, it will return either 401
or 404
depending on the error.