getAccessTokenSilently throws error login required

Greate answer my friend, works for me, after several hours finding solution