175
Views
2
Comments
Custom authentication using consume API
Application Type
Mobile

Hi All

I want to build mobile apps using custom authentication, i need a guide to achieve my goal. 

First i consume API to " get a token when user login " then the 2nd API to "verify the token to Header Bearer Token ". My question how do i store the token in local storage (need to create a client action ) so that later when consume other API the token can be used. I show the explanation in picture :

1. token created when login 

2 . verify the token 

3 . use the token to consume other api 

instead store token to database i want to store it to local storage, please let me know if anyone can figure it out to solve this problem , thanks for your time. 

Best Regards, 

Yansen


 

TicketingApps_v463.oml
2023-10-21 19-42-11
Tousif Khan
Champion

Hello,

You Can save the generated token into your client variable, and you can destroy after your verification,

Client Variables reset to their default values when the user signs out of the app 

Client Variable

and to generate Guid please check this

https://www.outsystems.com/forums/discussion/79626/do-not-know-how-to-use-generateguid/

I hope it helps

Thanks

2021-10-09 07-57-44
Stefan Weber
 
MVP

Hi. On mobile apps you should store your bearer token in a secure storage. The secure key store plugin provides access to the native secure storages of android and ios. Key Store Plugin - Overview | OutSystem

Best

Stefan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.