Skip to content

Commit b28d22a

Browse files
revert and finally fix verify device
1 parent 1a19bfb commit b28d22a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

apps/authproxy/middleware/40_tinytowerDecode.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export const AuthProxyApiDecodeHashMiddleware = HttpLayerRouter.middleware(
1414
HttpMiddleware.make((httpAppMiddleware) =>
1515
Effect.gen(function* () {
1616
const request = yield* HttpServerRequest.HttpServerRequest;
17+
if (request.url.startsWith("/verify_device/tt/")) return yield* httpAppMiddleware;
18+
1719
const lastSlashIndex = String.lastIndexOf("/")(request.url);
1820
if (Option.isNone(lastSlashIndex)) return yield* new HttpApiError.BadRequest();
1921

packages/tinytower-sdk/src/TinyTower.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,7 @@ export const device_verifyDevice = Effect.fn("device_verifyDevice")(function* ({
274274
});
275275

276276
const playerId = yield* Effect.map(nimblebitAuth.burnbot, ({ playerId }) => playerId);
277-
const response = yield* endpoint({
278-
path: {
279-
playerId,
280-
verificationCode:
281-
nimblebitAuth.host === "https://sync.nimblebit.com"
282-
? verificationCode
283-
: yield* nimblebitAuth.sign(verificationCode),
284-
},
285-
});
277+
const response = yield* endpoint({ path: { playerId, verificationCode } });
286278

287279
if ("error" in response) {
288280
return yield* new NimblebitError.NimblebitError({

0 commit comments

Comments
 (0)