My Clients Server is a backend designed to handle an user authentication to My Clients account process. It requests, retrieves and refresh authentication credentials.
After cloning this repository, you'll need to run "npm install" on the root directory of this application, so all dependencies can be installed properly.
On controller/auth.ts:
- On requestToken controller, change the redirect uri to "http://localhost:8080/...", so the get token request can be made locally
- On getToken controller, change the redirect uri to "http://localhost:5173/...", so your client side application can receive and store the authentication credentials
Finally, run "npm start" to start running the server locally. Your server should be up and running.
This server supports three different routes:
-
"/": this is the index route. It makes an authentication request to My Clients website, where the user will be redirected and requested to login. After the login, server will redirect to "/get-token/" with the rights credentials to request an access token.
-
"/get-token/": get the necessary query parameters to request an access token. When the access token is retrieved, server will redirect to client side with the credentials in the URI.
-
"/refresh-token": receives an access token as query param and request a new valid access token. When the new access token is retrieved, server will return a JSON response with the new credentials.
My Clients Server uses the following tech stacks:
- Typescript
- NodeJS
- Express
Faced any problems? Don't hesitate to contact me on lucasnobre037@gmail.com or lucasnobre37@outlook.com.