getAccessToken() return type should be string | null, not just string
See original GitHub issueSince the method internally calls storage.getItem()
, it can return either string
or null
(if there is no access token in the storage). However, currently the typings say that it always returns a string
, which is wrong and needs to be updated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
getAccessToken() returns null - java
As Priyam Gupta said, this is solved with api.amazon.com/user/profile?access_token= And the code I used to solve it is: String accessToken ...
Read more >AuthToken.getAccessToken()'s return value is NULL
Tried the following code to retrieve access token in Auth.RegistrationHandler's createUser method but the return value is NULL. String ...
Read more >Auth.AuthToken.getAccessToken returns null
I am doing pretty much the same in exec anon: AuthProvider pcs = [SELECT Id FROM AuthProvider WHERE DeveloperName = 'PCS']; String accessToken...
Read more >Call Your API Using the Authorization Code Flow
This tutorial will help you call your own API using the Authorization Code Flow. If you want to learn how the flow works...
Read more >AuthenticationResult Class (Microsoft.Identity.Client)
This property will be null if tenant information is not returned by the service. TokenType. Identifies the type of access token. By default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ahhh, check! Thx for sticking with it, I now see what you mean 😅 (I tend to miss info if it’s only in the title and not also in the issue body, I should work on this.)
Apologies for taking so much of your time with a reading mistake on my end. FWIW I presume it’s taught me a useful lesson!
The docs for the
OAuthStorage
are fine. The problem is withgetAccessToken()
return type (and maybe some other functions - I did not take a look)