-
-
Notifications
You must be signed in to change notification settings - Fork 964
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: enable b2b_sso hook in more places (#4168)
fix: allow b2b_sso hook in more places --------- Co-authored-by: zepatrik <[email protected]>
- Loading branch information
Showing
6 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ import ( | |
|
||
"github.com/ory/kratos/selfservice/hook/hooktest" | ||
"github.com/ory/x/sqlxx" | ||
"github.com/ory/x/uuidx" | ||
|
||
"github.com/ory/kratos/hydra" | ||
"github.com/ory/kratos/selfservice/sessiontokenexchange" | ||
|
@@ -1531,6 +1532,7 @@ func TestStrategy(t *testing.T) { | |
subject2 := "[email protected]" | ||
scope = []string{"openid"} | ||
password := "lwkj52sdkjf" | ||
orgID := uuidx.NewV4() | ||
|
||
var i *identity.Identity | ||
t.Run("step=create password identity", func(t *testing.T) { | ||
|
@@ -1555,6 +1557,8 @@ func TestStrategy(t *testing.T) { | |
|
||
client := testhelpers.NewClientWithCookieJar(t, nil, nil) | ||
loginFlow := newLoginFlow(t, returnTS.URL, time.Minute, flow.TypeBrowser) | ||
loginFlow.OrganizationID = uuid.NullUUID{orgID, true} | ||
require.NoError(t, reg.LoginFlowPersister().UpdateLoginFlow(context.Background(), loginFlow)) | ||
|
||
var linkingLoginFlow struct { | ||
ID string | ||
|
@@ -1572,6 +1576,7 @@ func TestStrategy(t *testing.T) { | |
assert.True(t, gjson.GetBytes(body, "ui.nodes.#(attributes.name==identifier)").Exists(), "%s", body) | ||
assert.True(t, gjson.GetBytes(body, "ui.nodes.#(attributes.name==password)").Exists(), "%s", body) | ||
assert.Equal(t, "[email protected]", gjson.GetBytes(body, "ui.messages.#(id==1010016).context.duplicateIdentifier").String()) | ||
assert.Equal(t, gjson.GetBytes(body, "organization_id").String(), orgID.String()) | ||
linkingLoginFlow.ID = gjson.GetBytes(body, "id").String() | ||
linkingLoginFlow.UIAction = gjson.GetBytes(body, "ui.action").String() | ||
linkingLoginFlow.CSRFToken = gjson.GetBytes(body, `ui.nodes.#(attributes.name=="csrf_token").attributes.value`).String() | ||
|