-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Describe the bug
Utilizing the same secret, and same JWT results in different results when trying to decode on android vs IOS. Decoding is successful on android, but results in "Error: Decoding failed" error on IOS.
To Reproduce
Here is an example that is currently producing this inconsistency on my devices.
import { decode } from 'react-native-pure-jwt'
const test_decode = async () => {
try {
let test_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXJpYWxfbnVtYmVyIjoiNWYxMGExNjMtMjk2OC00ZDZkLWIyZDgtOGQxNjQwMDNlMmQ0Iiwic2VxIjo1MTI4MTYsIm5hbWUiOiJOYW1lMSIsImlkIjo2NTQsImRlc2NyaXB0aW9uIjoiVGVzdCBEZWNvZGluZyJ9.ahLaTEhdgonxb8rfLG6NjcIg6rqbGzcHkwwFtvb9KTE";
let test_key = "SuperSecretKey";
let test_result = await decode(test_token, test_key);
console.log(test_result);
} catch(error) {
console.warn(error);
}
}
test_decode();
Expected behavior
Decoding should be consistent across platforms when given the same information on both.
Smartphone (please complete the following information):
- Devices: IPhone XR, Samsung S9+
Please let me know if there is more information needed or if I am utilizing this function incorrectly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels