getToken from useKindeBrowserClient
Would it be possible for
I need to pass access_token in Authorization header - currently I'm working this around just grabbing access_token from cookies, but this is not ideal.
My case is close to:
Later I use this like:
In above example code is executed before kinde is loaded (isLoaded: false), and getToken just returns null
Would be nice if getToken returned promise that would at least wait for stuff to load. Similarly how it is build with useKindeAuth in @kinde-oss/kinde-auth-react (I haven't tried it myself, but getToken returns a promise.)
getToken from useKindeBrowserClient to asynchronously respond with token (ideally when isLoading is false)?I need to pass access_token in Authorization header - currently I'm working this around just grabbing access_token from cookies, but this is not ideal.
My case is close to:
Later I use this like:
In above example code is executed before kinde is loaded (isLoaded: false), and getToken just returns null
Would be nice if getToken returned promise that would at least wait for stuff to load. Similarly how it is build with useKindeAuth in @kinde-oss/kinde-auth-react (I haven't tried it myself, but getToken returns a promise.)