Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.68k stars 1.57k forks source link

[BUDI-7514] Current User.OAuthToken not being passed correctly. #11822

Open CCHV-GitHub opened 1 year ago

CCHV-GitHub commented 1 year ago

UPDATE: PLEASE SEE FIRST COMMENT FOR MORE DETAILS

Checklist

Hosting

Describe the bug {{ Current User.OAuthToken }} Authentication token not working correctly.

To Reproduce Steps to reproduce the behavior:

  1. Create Authentication on Rest API Query as shown below image

  2. Create query and use the Azure AD auth that was created above. image

  3. Get Authentication Failed message image

Expected behavior Authentication succeeds and gets results

Screenshots Shown above

Additional context I tested by simply getting a token via powershell and dropping it into the Authentication and it works successfully so the issue must be with the {{ Current User.OAuthToken }} handlebar, but I don't know how to diagnose. image image image

BUDI-7514

CCHV-GitHub commented 1 year ago

Soo I found after manually grabbing a token using powershell the build in auth {{ Current User.OAuthToken }} started working while the powershell token was valid, when the powershell token expired so did the built in auth token {{ Current User.OAuthToken }}

image

I also checked that access tokens is allowed in the app registration

image

It looks like budibase is not grbbing the initial token or refreshing the token. Have I misconfigured something?