chore(oauth-mock): redirect immediately

pull/5924/head
k3yi0 2022-06-03 11:08:04 +02:00
parent 4a174fef6a
commit 4e5ff6359d
2 changed files with 1 additions and 2 deletions

View File

@ -24,8 +24,6 @@ app.get("/oauth/authorize", async (req, res) => {
const state = req.query.state;
const redirect = req.query.redirect_uri || CONFIG.redirect_uri;
console.info("GET /oauth/authorize: ", redirect);
// Wait 100ms before before being redirected
await new Promise(resolve => setTimeout(resolve, 100));
res.setHeader("Location", `${redirect}?code=${encodeURIComponent(redirect + new Date().toISOString())}&state=${encodeURIComponent(state)}`);
res.sendStatus(302);
res.end();

View File

@ -4,6 +4,7 @@ describe('Use Admin tab', () => {
beforeEach(() => {
cy.OAuthLogin('test').then(() => {
cy.visit('/login')
cy.removeConnections()
cy.createConnection()
cy.get('@connections').then(source => {