Agne Ado
11/18/2022, 8:56 AMBirk Skyum
11/18/2022, 10:47 AMonama
11/18/2022, 12:50 PMdamian_w
11/18/2022, 1:40 PMthatnerdjack
11/18/2022, 8:31 PMreevolver
11/18/2022, 9:30 PMrp
11/19/2022, 3:30 AMrp
11/19/2022, 3:31 AMemccue
11/19/2022, 11:10 PMemccue
11/19/2022, 11:10 PMemccue
11/19/2022, 11:10 PMemccue
11/19/2022, 11:14 PMengin
11/20/2022, 2:16 AMSuperTokens.init(SuperTokensInitConfig);
admin.initializeApp();
const app = express();
const whitelist: string[] = [
websiteDomain,
'http://localhost:4201',
'http://localhost:4202',
'http://localhost:4203',
... etc.
];
app.use(cors({
origin: function(origin, callback) {
if (origin && whitelist.indexOf(origin) !== -1) {
callback(null, true);
} else {
callback(new Error(`Origin ${origin} not permitted due to CORS policy`));
}
},
allowedHeaders: ['content-type', ...SuperTokens.getAllCORSHeaders()],
credentials: true,
}));
app.use(middleware());
app.use(errorHandler());
export default app;
rp
11/20/2022, 3:01 AMrp
11/20/2022, 3:03 AMrp
11/20/2022, 3:05 AMGnarusly
11/20/2022, 11:14 AMthe subdomain for each user is extracted from their email provider, ex. for user@abc.com, abc would be the subdomain.
As in this case, they may be using example@gmail.com, which would have access to a.website.com and b.website.com, instead of gmail.website.comJokcy
11/20/2022, 12:44 PMgetAuthorisationURLWithQueryParamsAndSetState
and pass down the authorisationURL
param. But the response url did not include the authorisationURL
I passed, and I did not have a pre-set authorisationURL
in my backend. Anyone knows why?rp
11/20/2022, 1:03 PMengin
11/21/2022, 4:33 AMversionSession()
returns true, with a user ID. However, that User does not exist. It must have been deleted.
So the problem seems to be: when a User gets deleted on the backend, if the user still has a cookie, the app can get "stuck" or go into an erroneous state.
The obvious workaround is to just delete the cookie. I can do that because I understand enough about how this works. My users would never understand, and they would be very confused, and telling them to delete their cookie is not a great option.
I can't imagine how a user would get into this state, but now I know that this is a possible state, and therefore I think I need to deal with it.
Note that now that you are offering a User Dashboard, this type of case is more likely to occur!
Do you have any advice?rp
11/21/2022, 5:25 AMengin
11/21/2022, 8:58 AMArne
11/21/2022, 9:08 AMJokcy
11/21/2022, 12:26 PMsignInUpPOST
on backend for github oauth, is it possible to get the user info (like github avatar url) from response of originalImplementation.signInUpPOST
?lhenriquez
11/21/2022, 2:34 PMNoirLime
11/21/2022, 3:26 PMdamian_w
11/21/2022, 3:56 PMAyush6543
11/21/2022, 4:20 PMrp
11/21/2022, 4:30 PMrp
11/21/2022, 4:32 PM