Notifier never calls the authorization listener
See original GitHub issueExpected Behavior
Clear documentation that shows how to handle the callback with code
[REQUIRED] Describe expected behavior
It will be nice to show what happens when the (web)app is redirected to the callback URL with the code
Describe the problem
I’ve configured and started the SSO flow. My app gets redirected to the callback URL /auth?code=jsDWmM6u8ebY1wtDM...
. From this point it is not clear what should happen. The library does nothing, it doesn’t exchange the code for tokens, the authorization listener gets never called. Can I make a request to exchange the code? How do I get the verifier
? From the electron sample the verifier is taken from the request in the listener.
AuthorizationServiceConfiguration.fetchFromIssuer('/oauth')
.then(response => {
this.configuration = response;
this.showMessage('Completed fetching configuration');
})
.catch(error => {
console.log('Something bad happened', error);
this.showMessage(`Something bad happened ${error}`);
});
this.authorizationHandler.setAuthorizationNotifier(this.notifier);
this.notifier.setAuthorizationListener((request, response, error) => {
log('Authorization request complete ', request, response, error);
if (response) {
this.code = response.code;
this.showMessage(`Authorization Code ${response.code}`);
}
});
[REQUIRED] Environment
- AppAuth-JS version: 1.3.1
- AppAuth-JS Environment (Node, Browser (UserAgent), …): Browser (Firefox)
- Source code snippts (inline or JSBin)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:8
Top Results From Across the Web
Application Listener not receiving event notification
Unfortunately, the AuthenticationSuccessEvent doesn't seem to be getting captured, and when I debug, the onApplicationEvent function is never called. I haven't ...
Read more >Allow or silence notifications for a Focus on iPhone
Go to Settings > Focus > Focus Status. Turn on Share Focus Status, then select the Focus options you want to share. Allow...
Read more >NotificationListenerService - Android Developers
Listener hints constant - the primary device UI should disable phone call sounds, ... integer notification types that this listener never wants to...
Read more >Complying with the Telemarketing Sales Rule
make certain prompt disclosures in every outbound call. get express verifiable authorization if accepting payment by methods other than credit or debit card....
Read more >Spring AMQP
Starting with version 2.2, you can configure the listener container factory and listener to receive the entire batch in one call, simply set...
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
This issue could depend on what framework you’re suing, and how it generates query strings. We found AppAuth’s default query string handler assumes a
#
is present in the URL for routing, Angular style. Other frameworks, such as React, may omit this, confusing the parser so it won’t pick up the OAuth response from the query string.You can work around this by extending the
BasicQueryStringUtils
from AppAuth to assume a hash is never present:I feel like this should be in the documentation, or even better, add the
NoHashQueryStringUtils
to the core library.