Currently the Google SSO, and the Microsoft SSO in a PR are using a front end library to get an Openid Connect IDToken. Better security could be achieved by properly following the Authorization Code Flow to obtain this IDToken.
This will involve rewriting both front and backend code, Pastport.js is a possible library to use for this goal. This will make the login process more secure.