Question must be very typical, but i can’t really find a good comparison.
I’m new to Ionic & mobile dev.
We have a REST API (Spring Boot).
API is currently used by AngularJS 1.5 front-end only.
AngularJS app is authenticated based on the standard session-based authentication.
What should i use to authenticate an ionic 3 app?
As i understand, have 2 options:
- 1. Use the same auth as for Angular front-end.
- 2. implement oauth2 on back-end and use the token for ionic app.
As for now i understand that implementing oauth2 at back-end is a way to go, because with the option #1 i should store the username & password in the local storage (ionic app), which is not safe. Over wise if i don’t do that - user will have to authenticate each time the app was launched. Am i right?
So, that leaves me option #2 - store oauth2 token on the device?