a

    anubhav

    6 months ago
    When I click on continue with Google button it gives me following error. Please help me. recipeImplementation.js:163 GET http://localhost:3001/authorisationurl?thirdPartyId=google 404 (Not Found)
    n

    nkshah2

    6 months ago
    @User Can you post the information you pass in
    appInfo
    for the frontend and backend?
    Also what recipes are you using?
    a

    anubhav

    6 months ago
    social authentication + email and password authentication
    n

    nkshah2

    6 months ago
    @User Moving the conversation here (also note that I deleted your screenshots because they contained your API key in them)
    Please post your SuperTokens init config again (stripping the API key)
    a

    anubhav

    6 months ago
    Should, I post here ??
    n

    nkshah2

    6 months ago
    Yes please
    a

    anubhav

    6 months ago
    Frontend : export function getApiDomain() { const apiPort = 3001; const apiUrl = http://localhost:${apiPort}; return apiUrl; } export function getWebsiteDomain() { const websitePort = 3000; const websiteUrl = http://localhost:${websitePort}; return websiteUrl; } SuperTokens.init({ appInfo: { appName: "Passwordless Authentication", apiDomain : getApiDomain(), websiteDomain : getWebsiteDomain(), apiBasePath: "/", websiteBasePath: "/" }, recipeList: [ ThirdPartyEmailPassword.init({ signInAndUpFeature: { providers: [Github.init(), Google.init(), Apple.init()], }, emailVerificationFeature: { mode: "REQUIRED", }, }), Session.init(), ], });
    BacKend : const apiPort = 3001; const apiDomain = http://localhost:${apiPort}; const websitePort = 3000; const websiteDomain = http://localhost:${websitePort}; supertokens.init({ framework: "express", supertokens: { }, appInfo: { appName: "Passwordless Authentication", apiDomain, websiteDomain, apiBasePath: "/", websiteBasePath: "/" }, recipeList: [ ThirdPartyEmailPassword.init({ providers: [ // We have provided you with development keys which you can use for testing. // IMPORTANT: Please replace them with your own OAuth keys for production use. Google({ clientId: "1060725074195-kmeum4crr01uirfl2op9kd5acmi9jutn.apps.googleusercontent.com", clientSecret: "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" }), Github({ clientId: "467101b197249757c71f", clientSecret: "e97051221f4b6426e8fe8d51486396703012f5bd" }), Apple({ clientId: "4398792-io.supertokens.example.service", clientSecret: { keyId: "7M48Y4RYDL", privateKey: "-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgu8gXs+XYkqXD6Ala9Sf/iJXzhbwcoG5dMh1OonpdJUmgCgYIKoZIzj0DAQehRANCAASfrvlFbFCYqn3I2zeknYXLwtH30JuOKestDbSfZYxZNMqhF/OzdZFTV0zc5u5s3eN+oCWbnvl0hM+9IW0UlkdA\n-----END PRIVATE KEY-----", teamId: "YWQCXGJRJL", }, }), ], }), Session.init(), ], });
    there . . . ????
    n

    nkshah2

    6 months ago
    Yes give me a second, in the meantime please edit your message and remove the API key as it is sensitive information
    a

    anubhav

    6 months ago
    I have removed connectionURI and apiKey.
    rest keys I have used from supertoken docs page
    n

    nkshah2

    6 months ago
    Can you share the part of the code that adds the supertokens middleware (as explained in step 4 and 5 here: https://supertokens.com/docs/thirdpartyemailpassword/quick-setup/backend#4-add-the-supertokens-apis--cors-setup)
    a

    anubhav

    6 months ago
    app.use( cors({ origin: websiteDomain, allowedHeaders: ["content-type", ...supertokens.getAllCORSHeaders()], methods: ["GET", "PUT", "POST", "DELETE"], credentials: true, }) ); app.use( helmet({ contentSecurityPolicy: false, }) ); app.use(middleware()); // custom API that requires session verification app.get("/sessioninfo", verifySession(), async (req, res) => { let session = req.session; res.send({ sessionHandle: session.getHandle(), userId: session.getUserId(), accessTokenPayload: session.getAccessTokenPayload(), }); }); app.use(errorHandler()); app.use((err, req, res, next) => { res.status(500).send("Internal error: " + err.message); });
    n

    nkshah2

    6 months ago
    And just to confirm, your express server is started on port 3001?
    a

    anubhav

    6 months ago
    const websitePort = 3000; const websiteDomain = http://localhost:${websitePort};
    const apiPort = 3001; const apiDomain = http://localhost:${apiPort};
    n

    nkshah2

    6 months ago
    I mean when you call
    app.listen
    a

    anubhav

    6 months ago
    yes app.listen(apiPort, () => console.log(
    API Server listening on port ${apiPort}
    )); apiPort is 3001
    n

    nkshah2

    6 months ago
    It might be easier to get on a quick call to debug this if you dont mind?
    a

    anubhav

    6 months ago
    yeah i don't mind
    please tell me how can I connect ??
    n

    nkshah2

    6 months ago
    I have DMed you a meet link
    Just to summarise, the issue was that the import link for the social providers on the backend was missing