mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
[next] Auth Callback + Chunking (#2139)
* feat: added new auth-callback * fix: removed unused polyfill code * fix: fixed missed intersection observer * feat: enabled vendor chunks * fix: fix some issues with chunk splitting * fix: added intersection-observer to app polyfill * fix: fixed test * fix: removed lodash plugin which caused issue in prod * chore: access_token -> accessToken * feat: Show social login errors * fix: lint + add test * fix: restore width after facebook social login
This commit is contained in:
@@ -29,7 +29,7 @@ describe("extractJWTFromRequest", () => {
|
||||
};
|
||||
expect(extractJWTFromRequest((req as any) as Request)).toEqual(null);
|
||||
|
||||
req.url = "https://talk.coralproject.net/api?access_token=token";
|
||||
req.url = "https://talk.coralproject.net/api?accessToken=token";
|
||||
|
||||
expect(extractJWTFromRequest((req as any) as Request)).toEqual("token");
|
||||
});
|
||||
|
||||
@@ -115,7 +115,7 @@ export const signPATString = async (
|
||||
export function extractJWTFromRequest(req: Request) {
|
||||
const permit = new Bearer({
|
||||
basic: "password",
|
||||
query: "access_token",
|
||||
query: "accessToken",
|
||||
});
|
||||
|
||||
return permit.check(req) || null;
|
||||
|
||||
@@ -26,7 +26,7 @@ describe("extractJWTFromRequest", () => {
|
||||
};
|
||||
expect(extractJWTFromRequest((req as any) as Request)).toEqual(null);
|
||||
|
||||
req.url = "https://talk.coralproject.net/api?access_token=token";
|
||||
req.url = "https://talk.coralproject.net/api?accessToken=token";
|
||||
|
||||
expect(extractJWTFromRequest((req as any) as Request)).toEqual("token");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user