DEV Community

Vicente G. Reyes
Vicente G. Reyes

Posted on

Can still access login page after logging in using ReactJS and dj-rest-auth

I'm using dj-rest-auth for the authentication endpoints in my django project and reactjs in the frontend of my project. What happens if after I login, the user can still go to the /login page which should not.

Here's my LoginForm code:

import React, { useState } from 'react'
import {
…

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay