I am currently working on a project using Firebase Auth for the Google and Apple auth providers for a mobile app built in Flutter. For the login I am using firebae_ui_auth.
I need to link existing accounts with their Google account when they login.
Is decoding the ID Token and storing the account ID in my database what I am generally looking to do? Can I then use the ID token as a token required for routes? Or should I create my own JWT?
I currently am using am storing the account ID and cross checking it with the decoded ID token on accessing a route but this feels like it could be incorrect ID tokens expire. I am not at all knowledgeable about auth in any way.