In SSO after receiving auth code, gets unauthorized 401 in javascript console

Hi, i am trying to enable SSO for my nodered editor. Using azure ad as Identity provider, i could receive the authentication code having response type as code. But the problem is the code is not getting authenticated, and the editor is not getting loaded, it remains in the same page after receiving the code.

adminAuth:{
Type:”strategy”,
Strategy:{
Name:—-
Label:—
Icon:—-
Strategy : require(“passport-azure-ad”).OIDCStrategy,
Options:{
Identitymetadata: metadata url
Clientid:
Clientsecret:
Responsetype: “code”,
Responsemode:”query”,
Redirecturl: localhost,
AllowhttpforredirectURL: true,
Scope:[ openid, profile, email, offline_access],
Verify: function ( code, profile, done){
Console.log(code);// nothing gets printed here not sure why, not even string
Done(null, profile);
Return profile;
}
}
},
users: function (user){
return Promise.Resolve({username: user, permissions:”*”});
}

When does that verify function gets called, and not sure why the console.log is not printing anything.

I get unauthorized 401 in javascript console.

Is this a right way of handling the auth code and how can i access my editor page after this.

Kindly ignore the syntax errors if Any, posted just for a reference.

Are you trying to use the auth in Dashboard? Your code is only for the Editor and admin API's.

As of now only enabling for editor. [quote="TotallyInformation, post:2, topic:65555, full:true"]

Are you trying to use the auth in Dashboard? Your code is only for the Editor and admin API's.
[/quote]

Kindly let me know for any idea on this issue

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