WindmillWWindmill
Powered by
Kaushik VishwakarmaK
Windmill•8mo 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,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 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
11mo ago