Rob Pitcher
Rob Pitcher
I'm having the same issue as @thekamilpro while trying to use the -SuccessUseOrigin switch with Add-PodeAuth. I also tried modifying line 1345 of [Pode/src/Private/Authentication.ps1](https://github.com/Badgerati/Pode/blob/8aa7c2b220a1a86bb9732148834f7821ada15a28/src/Private/Authentication.ps1#L1345): >if ($Success.UseOrigin -and ($WebEvent.Method -ieq 'get'))...
So I'm now seeing the pode.redirecturl cookie is being set, but it still doesn't redirect as expected. I tested a workaround by adding some logic to the scriptblock of route...
@Badgerati yes, here's the full auth/scheme setup: ```Set-PodeViewEngine -Type Pode Enable-PodeSessionMiddleware -Duration 120 -Extend $scheme = New-PodeAuthAzureADScheme -ClientID 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -ClientSecret 'xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxx' -Tenant 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -RedirectUrl https://api.mydomain.com/oauth2/callback $scheme | Add-PodeAuth -Name 'Login'...
>what happens if you set `-SuccessUrl '/'` (or any random path in theory, since we're redirecting to the origin) on your `Add-PodeAuth`? So I tested this and the result was...