Starts in:
2 DAYS
11 HRS
19 MIN
30 SEC
Starts in:
2 D
11 H
19 M
30 S
Open Closed

Question About OAuth Authentication from Console App #6773


User avatar
0
cangunaydin created

Hello, I am having strange issue about the authentication from console app. here is my code to do the auth.

this code works fine when I use email address as username, but when i switch to username ("admin"). it doesn't login and it gives me invalid_grant(invalid username or password!) exception.

is this expected behavior or is there a way to login with username or email address?


2 Answer(s)
  • User Avatar
    0
    cangunaydin created

    Hello again, I realized now it only login with host account and not allowing tenant logins. When i give email address, there was already an email address on the host account with that email address and password was the same. That's why it logged in with tenant email address but not with username.

    So the question here is why tenant header is ignored while i am doing the request? here is what i have found.

    as you can see tenant header is over there. but i am always getting invalid_grant with invalid email address and password. any idea what can be the problem?

  • User Avatar
    0
    cangunaydin created

    Ok i figured it out at the end. It was working fine on my local. My production was on azure kubernetes service with nginx ingress. So over there i need to do some configuration to accept underscores for tenant header.

    https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#enable-underscores-in-headers

    now it works fine.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06