Skip to content

Commit

Permalink
test: make integration test server more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Sep 26, 2024
1 parent 4b49700 commit faab5a1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/auth-react-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,13 @@ app.post("/test/getTOTPCode", (req, res) => {
res.send(JSON.stringify({ totp: new OTPAuth.TOTP({ secret: req.body.secret, digits: 6, period: 1 }).generate() }));
});

app.post("/test/create-oauth2-client", async (req, res) => {
const { client } = await OAuth2Provider.createOAuth2Client(req.body);
res.send({ client });
app.post("/test/create-oauth2-client", async (req, res, next) => {
try {
const { client } = await OAuth2Provider.createOAuth2Client(req.body);
res.send({ client });
} catch (e) {
next(e);
}
});

app.get("/test/featureFlags", (req, res) => {
Expand Down

0 comments on commit faab5a1

Please sign in to comment.