OIDC Auth Bug (#13133)

* fixes issue with oidc auth method when MetaMask chrome extenstion is used

* adds changelog entry

* updates auth-jwt integration tests

* fixes race condition in runCommands ui-panel helper method where running multiple commands would not always result in the same output order
This commit is contained in:
Jordan Reimer
2021-11-15 08:48:11 -07:00
committed by GitHub
parent 469aa1acb8
commit 26970c4b1a
6 changed files with 91 additions and 8 deletions

View File

@@ -211,7 +211,10 @@ module('Integration | Component | auth jwt', function(hooks) {
await waitUntil(() => {
return this.openSpy.calledOnce;
});
this.window.trigger('message', buildMessage({ data: { state: 'state', foo: 'bar' } }));
this.window.trigger(
'message',
buildMessage({ data: { source: 'oidc-callback', state: 'state', foo: 'bar' } })
);
run.cancelTimers();
assert.equal(this.error, ERROR_MISSING_PARAMS, 'calls onError with params missing error');
});
@@ -228,6 +231,7 @@ module('Integration | Component | auth jwt', function(hooks) {
'message',
buildMessage({
data: {
source: 'oidc-callback',
path: 'foo',
state: 'state',
code: 'code',
@@ -253,6 +257,7 @@ module('Integration | Component | auth jwt', function(hooks) {
buildMessage({
origin: 'http://hackerz.com',
data: {
source: 'oidc-callback',
path: 'foo',
state: 'state',
code: 'code',
@@ -277,6 +282,7 @@ module('Integration | Component | auth jwt', function(hooks) {
buildMessage({
isTrusted: false,
data: {
source: 'oidc-callback',
path: 'foo',
state: 'state',
code: 'code',