Login and logout authentication flow of HotWax Commerce app | Ionic | Vue

Published: 29 June 2022
on channel: HotWax Developer Network
114
0

#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  


Watch video Login and logout authentication flow of HotWax Commerce app | Ionic | Vue online without registration, duration hours minute second in high quality. This video was added by user HotWax Developer Network 29 June 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 11 once and liked it people.