UNSOLVED Prevent user from accessing FusionAuth login page after using /api/login
When I tried the authorization code using OAuth endpoint such as:
The login page was displayed
I could sign in successfully, if I tried to use the above OAuth2 endpoint above, no login page displayed and I would be redirected to my Front-end web page, which was good.
However, when I tried with /api/login endpoint:
Even user session was created successfully (Tenant 02 - IoT Warehouse 02) as the below image
If I tried with the OAuth2 endpoint above, the login page still displayed as I haven't logged in yet.
My question is: Can I prevent login page from being displayed if I successfully login using /api/login
dan last edited by
@lightalakanzam Not with standard fusionauth, because the hosted login pages don't know that the login has occurred.
You could perhaps set a cookie on login with the login API and then look for that cookie in an http proxy in front of FusionAuth, and deny access to the login pages at that time.
Or, you could, if you are only using the login API, set up the theme to have a blank login page.