get Decoded Payload
Decodes a JSON Web Token (JWT) and extracts information from its payload.
This function uses the JWT library to parse the JWT and retrieve specific claims from its payload. It constructs and returns a DecodedPayload object containing the decoded information, including email, remote ID, issued-at time (iat), and expiration time (exp).
If any decoding error or null values are encountered, the function removes the token from preferences and throws an IllegalArgumentException with an error message.
Return
A DecodedPayload object containing decoded information from the JWT payload.
Parameters
token
The JSON Web Token to decode and extract payload information from.
Throws
if the JWT is not valid or contains null values in required claims.