Feature(s) impacted
After adding a second staging environment for my Rails app both on the Forest interface and in my env variables, it is impossible to authenticate and access this environment’s interface.
Observed behavior
A call to https://api.forestadmin.com/oidc/auth
fails with this payload (edited with fake urls for clarity):
{“errors”:[{“status”:400,“detail”:“The redirect uri must be one of old-staging-url.com/forest/authentication/callback. Received “[new-staging-url.com/forest/authentication/callback](https://okarito-api-staging.swile.co/forest/authentication/callback\)””,“meta”:{},“name”:“InvalidRedirectUriError”}]}
Expected behavior
Would be nice to be able to login through my new staging server.
Context
- Project name: Okarito
- Team name: Tech
- Environment name: staging-k8s
Hello @Marina_Starkova Welcome to our community.
- Can you share your APPLICATION_URL?
- Can you open your browser Network tab and copy past the falling call with related information?
Thanks for your time.
Kind regards,
Morgan
Hi Morgan, thanks,
here you go:
the call https://api.forestadmin.com/oidc/auth?client_id=eyJraWQiOiJFN3E2Q0FWNGxuWUtwNmdPTlFiaWlZOFhVUDVWSHhmS21VUHZRSnV0Q1Q4IiwiYWxnIjoiUlMyNTYifQ.eyJ0b2tlbl9lbmRwb2ludF9hdXRoX21ldGhvZCI6Im5vbmUiLCJyZWRpcmVjdF91cmlzIjpbImh0dHBzOi8vYXBpLXN0YWdpbmcub2thcml0by1pbnRlcm5hbC5jb20vZm9yZXN0L2F1dGhlbnRpY2F0aW9uL2NhbGxiYWNrIl0sImFwcGxpY2F0aW9uX3R5cGUiOiJ3ZWIiLCJncmFudF90eXBlcyI6WyJhdXRob3JpemF0aW9uX2NvZGUiXSwicmVzcG9uc2VfdHlwZXMiOlsiY29kZSJdLCJlbnZpcm9ubWVudF9pZCI6NTQ4NDgsImlzcyI6IkZPUkVTVF9BVVRIRU5USUNBVElPTl9TWVNURU0iLCJpYXQiOjE2MzM1MjU0MDd9.LXh4dVlox7eZoGcaO3O1Pc_JwxUvKpHADQ1ra1dz9Pi3gLqOyyD5AUlpCjYHBYrrkexTLz8Xo1-kCtwVrBHrnYNSUsRj_04HwhE_9s6oiB3TQzqDboC3oWYjFrGiwo94YXD01D8PI6VeX_Kz-ad2KENzKoHdMtHB9Px0tJSKIfvgPFlBw612__AGe45mBqX6YVEf9G912HvOuj4Y6SB6lnG6cWyhWFK0DamUotmiTbalxkXHlxWMkK9CFued_wl04LOwqLBrGANY_gwh41bPHMccDCg8Ua-CJmJ4zxBv5hJewLFYbAGXBUMN8rE8wI_S4-tRGttwYTy2DK0Q5mSJ2g&redirect_uri=https%3A%2F%2Fokarito-api-staging.swile.co%2Fforest%2Fauthentication%2Fcallback&response_type=code&scope=openid%20email%20profile&state=%7B%22renderingId%22%3D%3E132610%7D
And the response:
{"errors":[{"status":400,"detail":"The redirect uri must be one of https://api-staging.okarito-internal.com/forest/authentication/callback. Received \"[https://okarito-api-staging.swile.co/forest/authentication/callback\](https://okarito-api-staging.swile.co/forest/authentication/callback%5C)"","meta":{},"name":"InvalidRedirectUriError"}]}
APPLICATION_URL: “https://okarito-api-staging.swile.co/fr”
Hello @Marina_Starkova,
Sorry for this late answer.
Looking again at your logs, you must have a wrong APPLICATION_URL. APPLICATION_URL must match your new staging environment URL.
Or you have a wrong FOREST_ENV_SECRET.
Looking deeper at the/oidc/auth
call it refers to z_staging aws is it the right environment (your second staging)?
Let me know.
Again, sorry for the delayed response.
Kind regards,
Morgan