These changes include:
1. Changes to the response structure when logging in with a third-party provider, by wrapping the token in `authToken` instead of directly entering it in the return data section.
2. Adding a type to user session creation by taking only the important elements. This is to prevent data leaks because important data is in jwt.
This new route serves to find the client callback after successfully logging in from the provider page. This is done so that the callback becomes more flexible and can be changed at any time.
These changes include:
1. Replacing the app token with a standard authorization barrier.
2. Changing the response body in the OAuth request by wrapping the endpoint link with a structure instead of placing it in the callback payload data.
Change the user creation flow in the register so that it must go through the
main create user service first instead of directly accessing the create user
repo.
Create a safeguard so that when a user enters an email address that has already been used with another OAuth provider,
it will be rejected to avoid double entries.
Adding a callback option to the Google OAuth provider used to define the OAuth callback URI. If not defined, the
callback URI will use the default value in the .env file.
provides the option to define a callback URI following a request from the frontend; if not defined, it will
automatically use the backend's default URI.
Create a middleware app access token, so that all requests must include `access_token` in the header with a value equal
to API_KEY in the .env file. If not, a `403 Forbidden` error will be returned.
Create a flow where if the user logs in with a registered Google account, they are immediately authenticated, but if no
account is found, create a new one.