fix(oauth2): generate default oauth2RedirectUrl based on page location and path (#7476)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a0e9923dd5
commit
a89c90ec77
@@ -5,4 +5,22 @@ describe("dynamic default oauth2RedirectUrl", () => {
|
||||
.then(win => win.ui.getConfigs())
|
||||
.should("include", { oauth2RedirectUrl: "http://localhost:3230/oauth2-redirect.html" })
|
||||
})
|
||||
it("should compute an oauth2RedirectUrl based on the browser's location at runtime, including the path", () => {
|
||||
cy.visit("/pages/5085/")
|
||||
.window()
|
||||
.then(win => win.ui.getConfigs())
|
||||
.should("include", { oauth2RedirectUrl: "http://localhost:3230/pages/5085/oauth2-redirect.html" })
|
||||
})
|
||||
it("should compute an oauth2RedirectUrl based on the browser's location at runtime, including the path, without confusing the file name for a folder name", () => {
|
||||
cy.visit("/pages/5085/index.html")
|
||||
.window()
|
||||
.then(win => win.ui.getConfigs())
|
||||
.should("include", { oauth2RedirectUrl: "http://localhost:3230/pages/5085/oauth2-redirect.html" })
|
||||
})
|
||||
it("should compute an oauth2RedirectUrl based on the browser's location at runtime, including the path, even it does not end with a slash", () => {
|
||||
cy.visit("/pages/5085")
|
||||
.window()
|
||||
.then(win => win.ui.getConfigs())
|
||||
.should("include", { oauth2RedirectUrl: "http://localhost:3230/pages/5085/oauth2-redirect.html" })
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user