How to refresh my access tokens with torii?

I am currently working on the authentication system for my ember app.

I have set up a custom OAuth 2.0 authentication system based on torii only (I don’t use simple-auth). The system is almost working, and I’m now trying to implement a token refresh logic.

I thought of reopening the torii session service in an initializer to add it a refresh method, but I get the following error when trying to import the SessionService class from the torii lib:

Error: Could not find module torii/services/torii-session imported from myapp/initializers/session

Of course, I’m wondering if what I’m trying is the cleanest way of handling it…

By chance, does somebody have any best practice using torii? :slight_smile:

Cheers from Berlin!