I am using the sign_in_with_apple package in flutter, to get details when a user logs in, and send it to Nest Js backend. also, I do Facebook authentication in the flutter side, I get the access token and send it to the backend.
So, for the Facebook auth, in the Nest Js backend after hitting some Facebook API endpoints, I get the unique token_for_business field for each user by which I can identify a specific user and it will not expire.
but my problem is with the apple auth, is there any data, field, or token that I can use to uniquely identify each user that will not expire?
the auth code and id token both expire very soon, I want something that does not expire and lets the users to login multiple times and only the first time save user's data into db and sign them up, any further signing in will not insert data to db, so a unique token that does not expire is important for me in doing apple auth.
also, the way I do the auth is the best thing I found on internet, is there any better way to do that?
thanks.