Skip to content

"Grant: missing session or misconfigured provider" error in callback (Colyseus integration) #307

@dave9011

Description

@dave9011

Hi,

I'm hoping someone can assist me in figuring out why I am receiving the "Grant: missing session or misconfigured provider" error when attempting to integrate AWS Cognito OAuth into my application using the Colyseus.js library Auth module. See https://docs.colyseus.io/authentication/module

From what I can tell, the issue does not see related to Colyseus, but rather lies within Grant. So far, I'm able to get the pop up to log the user into Cognito, however when the the redirect to the callback happens, I get the error mentioned above. I've traced it back to the callback method in request.js (see

var callback = ({request}) => ({provider, input, output}) =>
) where the provider given does not include the oauth property, but I cannot figure out exactly why that would be.

This is my configuration using the Colyseus integration (https://docs.colyseus.io/authentication/module/#oauth-providers-discord-google-xtwitter-etc):

auth.oauth.addProvider('cognito', {
    key: process.env.CLIENT_ID,
    secret: process.env.CLIENT_SECRET,
    scope: ['openid', 'email', 'profile'],
    subdomain: 'my-poc-app.auth.us-east-1.amazoncognito.com',
    redirect_uri: 'http://localhost:2567/auth/provider/cognito/callback',
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions