eh3rrera / chatkit-custom-auth-server

Custom authentication server in Java for Pusher Chatkit
MIT License
1 stars 3 forks source link

Swift library expects number in response - crashes otherwise #1

Open johndoran opened 5 years ago

johndoran commented 5 years ago

see, swift sdk can't parse that

https://github.com/eh3rrera/chatkit-custom-auth-server/blob/master/src/main/java/com/example/authserver/AuthenticationController.java#L50

eh3rrera commented 5 years ago

Thanks @johndoran.

I don't have a Mac to test it, but you're saying that by returning a number, as in:

Map<String, Object> map = new HashMap<>();
// ...
map.put("access_token", token);
map.put("expires_in", expireTime.toEpochMilli());
map.put("user_id", userId);

The Swift SDK will work fine?

Please let me know. Thanks!

johndoran commented 5 years ago

Confirmed. If returned as number it doesn’t force a crash

Sent from my Phone(excuse any typos)

On 16 Nov 2018, at 23:30, Esteban Herrera notifications@github.com wrote:

Thanks @johndoran.

I don't have a Mac to test it, but you're saying that by returning a number, as in:

Map<String, Object> map = new HashMap<>(); // ... map.put("access_token", token); map.put("expires_in", expireTime.toEpochMilli()); map.put("user_id", userId); The Swift SDK will work fine?

Please let me know. Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

eh3rrera commented 5 years ago

Code updated, thanks a lot! 👍