#ionic #vue #javascript #html #css
In this video I am demonstrating the login authentication flow and logout process in HotWax Commerce apps.
Data flow in this application is done from the vuex state management. So to store our user authentication information token, user info and instance url we have created ‘index.ts’ which manages the user's authentication state in our application.
While calling the login api we upload username and password as payload of the user to the server to retrieve the token of the current logged in user.
Here the token is the json web token which is coming from the api and is unique every time the user logs in.
When we click on the login button on the login page we are dispatching the login action which is calling the login service and asking for username and password. After entering a valid username and password, in response we will get a token of the user.
For logout we have stored empty token i.e. every time a user clicks on the logout button logout action will be dispatched and as we have stored empty token, the user will not get any information and it will log out and navigate to the login screen.
App github link : https://github.com/hotwax/ionic-sdk
Created By : Azkya Khan
LinkedIn : / azkya-khan-8747171a2
Смотрите видео Login and logout authentication flow of HotWax Commerce app | Ionic | Vue онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь HotWax Developer Network 29 Июнь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 11 раз и оно понравилось людям.