Feature request: an easier way to access to cognito tokens
betimer opened this issue · 6 comments
The current work around (#6) is not approprite.
Would there be an easier way to access accessTokens or IdTokens for cognito user?
Thanks.
Why is it not appropriate?
@djhi I am still checking if any convenient method e.g. CognitoAuthProvider.getTokens which returns current user's token, instead of going all from cognito native code.
If you already know some work around, please share. much appreciate.
You didn't answer my question
@djhi That's fine. I have checked all the source code of ra-auth-cognito, which does not provide this built-in handy function. I just made a decision to directly go with react instead of react-admin, with other considerations as well.
Thank you for the reply anyway, mate.
If we can automatically inject the jwt we get into all requests used by Data Providers, would be pretty nice
Some dataProviders support setting the httpClient for this purpose. See https://marmelab.com/react-admin/fetchJson.html