derptacious
08/28/2022, 12:23 PMrp
08/28/2022, 1:16 PMidanh
08/28/2022, 6:19 PMGqlExecutionContext.create(context)
and also tried injecting the session param to the resolver with
export const User = createParamDecorator(
(data: unknown, ctx: ExecutionContext) => {
const x = GqlExecutionContext.create(ctx);
const context = x.getContext();
return context.session;
},
);
with no success
and couldn't find any code example that combines graphql + nestengin
08/29/2022, 2:54 AMBinouse
08/29/2022, 10:26 AMn1ru4l
08/29/2022, 10:54 AMsub
) for the google provider was google-oauth2|<ID>
.
Now with supertokens I am building this within createNewSession
, for mapping the accounts.
const externalUserId = user.thirdParty ? `${user.thirdParty.id}|${user.thirdParty.userId}` : null;
I noticed that user.thirdParty.id
, here is google
and not google-oauth2
. Is it safe for me to simply replace the google|
part with google-oauth2
, is the <ID>
part of the auth0 sub stable?rp
08/29/2022, 11:18 AMrp
08/29/2022, 11:33 AMn1ru4l
08/29/2022, 12:19 PMBinouse
08/29/2022, 2:27 PMKillian
08/30/2022, 1:20 AMengin
08/30/2022, 4:52 AMidanh
08/30/2022, 5:28 AMrp
08/30/2022, 5:41 AMnickm91
08/30/2022, 6:01 AMimport { Logger } from "@nestjs/common";
import { NestFactory } from "@nestjs/core";
import { init } from "supertokens-node";
import { middleware } from "supertokens-node/lib/build/framework/express";
import Session from "supertokens-node/recipe/session";
import { AppModule } from "./app/app.module";
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const port = process.env.PORT || 3000;
await app.listen(port);
app.use(middleware());
init({
framework: "express",
appInfo: {
appName: "codestacks",
apiDomain: "http://localhost:3000",
websiteDomain: "http://localhost:4200",
},
supertokens: {
connectionURI: "http://localhost:3567",
},
recipeList: [Session.init()],
});
Logger.log(`🚀 Application is running on: http://localhost:${port}`);
}
bootstrap();
The expectation is now that http://localhost:3000/auth/signup
etc.. will now be created. However when using postman or curl to POST the routes are 404. Similarly, if you point the supertokens FE at this api domain it is similarly returning 404 in the network request coming from the supertokens UI.
FYI same thing happens if I follow the actual nest setup with in the guide with an AuthModule - however I suspect that should not make a difference to the minimal repro code above, its just "nestifying" the middleware, it should work the same in both scenarios AFAIK.rp
08/30/2022, 6:23 AMn1ru4l
08/30/2022, 7:07 AMemailVerificationFeature
option on the frontend? 🤔Diesel
08/30/2022, 7:40 AMflixoflax
08/30/2022, 10:48 AMrp
08/30/2022, 11:01 AMengin
08/30/2022, 12:04 PMveritas
08/30/2022, 12:23 PMrp
08/30/2022, 12:25 PMBinouse
08/30/2022, 12:56 PMIaS1506
08/30/2022, 2:29 PMKay47-
08/30/2022, 4:47 PMphilo
08/30/2022, 4:55 PMNick White
08/30/2022, 6:00 PMNick White
08/30/2022, 6:00 PMnickm91
08/31/2022, 11:52 AM