@ioloco/oauth
Version:
OAuth 2.0 utility library that provides helper functions for integrating third-party login providers. Designed to simplify the token exchange and user-fetch flows, while leaving API route implementation to the developer.
1 lines • 182 B
JavaScript
function r({error:r,code:e,state:o,redirectTo:t}){return r?`${t}/?error=${encodeURIComponent(r)}`:e&&o?null:`${t}/?error=missing_code_or_state`}export{r as handleOAuthCallbackError};