WindmillWWindmill
Powered by
Kaushik VishwakarmaK
Windmill•9mo ago
Kaushik Vishwakarma

Html output from my script for Microsoft OAuth result.

I have successfully implemented microsoft authorization flow using its code based authorization flow. So it works as below.
1. created a script to capture the code
2. added a no auth http trigger which i added to the redirect url for microsof login.
3. created a microsoft login url
4. copy pasted the url in browser which asks for microsoft authentication and then redirects to the http trigger.
5. the capture script gets the token using preprocessor et all and then i can fetch the graph token using the code. i can save the graph token or the refresh token somewhere say a variable and use it later.

The above works very well. However the output of my catch script is seen as a json so it shows something like this
{
"message": "You have succesfully authorized this windmill app with user <microsoft user id>",
"auth_time": "some time",
"scopes": "email openid"
}

I wanted to show a formatted html so that success looks good after redirect. so i created an html and returned from my script but shows up as a quoted string.
I tried {"html": "<div>my <b>formatted</b> html here</div>"} but it shows as json. it shows as formatted string when i test my script though because windmill's rich display renders the html.

Is there a way i can return a data which browser interprets as html and renders it instead of showing it as string or json.

Thanks,
Kaushik
WindmillJoin
3,388Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

We're live here https://discord.com/channels/930051556043276338/1278977038430240813

henri-c · 2d ago

rubenf

Infrastructure as code

rubenf · 3w ago

rubenf

As we're preparing for a new Windmill sandbox SDK, we took the opportunity **to open-source NSJAIL sandboxing** and make it available in CE and easier to set. In 1.634.0, just set nsjail to benefit from the tightest security and isolation per job. It's constraining so no need to use it unless you need but now you won't be restricted in security for CE if you need to.

rubenf · 4w ago

Similar Threads

Getting Empty Output from Bash Script
Trevor SullivanTTrevor Sullivan / help
3y ago
Use case: render html script
50l3r550l3r / help
3y ago
Download file as script result (windmill UI)
ni_kaNni_ka / help
12mo ago