Why would /auth/strategy/callback return a 404

I'm using the following adminAuth options (keys and domain removed). Node-Red redirects to cognito, and I am able to login, but when it redirects to node-red its looks like there is no handlers for callback endpoint auth/strategy/callback. Any thoughts on why that might be?

The page auth/strategy/callback?code=f5c21....6d5d7f says: "Cannot GET /auth/strategy/callback"

(node-red 1.2.6)

settings.adminAuth = {
    type:"strategy",
    strategy: {
        name: "cognito-oauth2",
        label: 'Sign in',
        icon:"fa-user",
        strategy: require('passport-cognito-oauth2').Strategy,
        options: {
            callbackURL: 'https://mydomain.com/auth/strategy/callback',
            clientDomain: 'https://cognito-account-yada.auth.us-east-1.amazoncognito.com',
            clientID: '...',
            clientSecret: '...',
            region: 'us-east-1',
            verify: function(token, tokenSecret, profile, done) {
                done(null, profile);
            }
        },
    },
    users: function(user) {
        return Promise.resolve({ username: user, permissions: "*" });
    }
};

because in the settigs.js file you have changed the admin root ? so it became /admin/auth/strategy/callback ?

Thank you much, that was it!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.