-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to integrate expirable into CelyUser to manage different tokens? #27
Comments
After looking further into Expirable, it doesn't seem that will integrate into Cely. Now what feature of Expirable is it that you like? I like the idea of having expiring properties and allowing user's to handle what happens if a property is expired. Would that solve the issue? |
https://github.com/rlam3/moyajwtlogin I think this is the best interpretation on how to might Expirable work with Cely. Not sure if there is a better way to optimize it. Some parts of the code can be a bit messy. Would love your feedback on this. Thanks! @initFabian |
Hey @rlam3 I'm so sorry about not getting back on this issue. This issue has my full attention now. Agree... bits of the code are a bit missy 😛, but overall, I understand what the example is. I guess right now we're at a crossroad as far as implementing an expiring feature. As of right now, I see that we have 2 options(but feel free to bounce around new ideas):
Just to throw around some ideas... Maybe upon successful login, we can have a Next, we need to be able to tell the developers, "Hey, the session is about to expire, you should go refresh the token." So using the TimeInterval work you've done, we can communicate back to the user that the session is about to expire. Before going any further, what are your thoughts? If you like the idea of adding an expiring date, I can draft up the docs for it, and we can go from there as far as deciding what the API should look like. btw, inside of MoyaLoginViewController you could've just used |
@initFabian I'd like to get your opinion on how to add the following Expirable protocol so I can manage tokens.
https://github.com/AndrewSB/Expirable
This will enable us see which token expired or is expiring soon. So far following your example I don't know where I am able to enable the Expirable protocol
The text was updated successfully, but these errors were encountered: