Cleaning up our OAuth2 authentication in the Rust API | glowing-telegram project - Episode 118
In this video, I dive into enhancing our Rust API integration with React-Admin for the Glowing-Telegram project. We tackle the complexities of OAuth2 authentication, focusing on the PKCE (Proof Key for Code Exchange) flow and ensuring robust error handling. Join me as I walk through debugging some common issues and optimizing our service to handle different scenarios gracefully.
🔗 Check out my Twitch channel for more streams: / saebyn
GitHub: https://github.com/saebyn/glowing-tel...
Discord: / discord
We kick off by attempting to properly convert values to strings and making sure our backend service doesn't crash unexpectedly. This involves evaluating when to fail fast during misconfigurations and thinking about the best practices for error handling in service handlers.
Next, we discuss the importance of constructing our service on startup and reusing it to avoid spontaneous runtime errors. I share insights on how to set up and authorize URLs, manage CSRF states, and determine what values are safe to return to the frontend.
Throughout the stream, we encounter and solve issues related to serialization and data handling, ensuring our API responses are efficiently structured and secure. The discussion also covers optimizing URL construction and maintaining internal state for redirect flows.
Towards the end, we troubleshoot the HTTP client's behavior, exploring different request handling techniques to make our setup more efficient. We wrap up with a summary of what to anticipate in our upcoming streams and future improvements for our project. Thanks for tuning in, and happy coding!
Join me in the next stream for more coding adventures, and don't forget to check out the links below to stay connected with our community.
🔗 Check out my Twitch channel for more streams: / saebyn
GitHub: https://github.com/saebyn/glowing-tel...
Discord: / discord