skip to Main Content

Authetication using Go Routers with flutter

class AuthGate extends StatelessWidget { const AuthGate({super.key}); @override Widget build(BuildContext context) { final AuthService authService = AuthService(); final userProvider = context.read<UserProvider>(); WidgetsBinding.instance.addPostFrameCallback((_) async { await authService.getUserData(context: context); if (userProvider.userModel.token.isNotEmpty) { context.go(AppRouterName.homeView.path); } else { context.go(AppRouterName.signInView.path); } }); return const Scaffold(…

VIEW QUESTION

JWT flow in React Native

I have a web app that communicates with an auth server that stores the access & refresh token in an httpOnly cookie when the user logs in, now building an app so what is the best practice for storing those…

VIEW QUESTION

Asp.net Identity JWT Issue

I have tried to implement JWT token authorisation into my system but it's not working. I'm new to ASP.net so please go easy on me. I can login fine and i do get the token as expected. But when I…

VIEW QUESTION

Javascript – Uncaught Error: Could not find a matching route when redirecting to /login page after logout

I'm trying to implement JWT in my project and an article provides a nice solution: https://dev.to/sanjayttg/jwt-authentication-in-react-with-react-router-1d03. Routes.jsx import { RouterProvider, createBrowserRouter } from "react-router-dom"; import { useAuth } from "../provider/authProvider"; import { ProtectedRoute } from "./ProtectedRoute"; import Login from "../pages/Login";…

VIEW QUESTION
Back To Top
Search