nebular icon indicating copy to clipboard operation
nebular copied to clipboard

How to implement windows authentication ?

Open zhiv2u opened this issue 5 years ago • 4 comments

is there any way to set the httpclient requestOptions.withCredentials = true while configuring the auth strategies?

zhiv2u avatar Feb 17 '20 12:02 zhiv2u

Any information about this @sashaqred?

diogofalken avatar May 25 '22 17:05 diogofalken

I'm not sure but it looks like it's not supported to do so with config. You can create your own auth strategy by extending the needed strategy. Something like export class WithCredentialsAuthStrategy extends NbPasswordAuthStrategy {...}

sashaqred avatar May 26 '22 13:05 sashaqred

@sashaqred Thank you for your prompt response!

Creating a Interceptor that adds withCredentials: true to specified endpoints was the workaround I found.

Do you think it's worthwhile to create an issue to get this added as a config option? I noticed that you already have a headers optional config in version 9.0.0, which may be something similar.

diogofalken avatar May 26 '22 13:05 diogofalken

Yeah, the interceptor is also a good solution. I can't compare it with pros and cons, I just glanced at sources.

You can create a feature request, sounds like a good feature request.

sashaqred avatar May 26 '22 17:05 sashaqred