Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
It seems to be simple at first, but it took a lot of research. At first I thought there must be a library that I could use, right? The closest I got was a library called -@react-oauth/google but it wasn't compatible with how RocketChat Google OAuth endpoint handled requests. It needed both acessToken and idToken but here on successful login we could get either accessToken or code object. The idToken is the JWT hashed version of code object. You can read more about it here. So after a while of research, I started implementing a custom hook which could handle this with the plain gapi-script from scratch. But, the gapi-script introduced some errors/warnings. So, I went and fixed the code and published my own library around it.
It seems to be simple at first, but it took a lot of research. At first I thought there must be a library that I could use, right? The closest I got was a library called -@react-oauth/google but it wasn't compatible with how RocketChat Google OAuth endpoint handled requests. It needed both acessToken and idToken but here on successful login we could get either accessToken or code object. The idToken is the JWT hashed version of code object. You can read more about it here. So after a while of research, I started implementing a custom hook which could handle this with the plain gapi-script from scratch. But, the gapi-script introduced some errors/warnings. So, I went and fixed the code and published my own library around it.
Created a fixed version of gapi-script library called gapi-cjs
RocketChat/EmbeddedChat - NEW: AUTH (google SSO)
RocketChat/Rocket.Chat.js.SDK - Fix: eval warnings coming from js-sha256
RocketChat/Rocket.Chat - User can send message to a channel without joining it