goauth2
v1.0.9
Published
一个基于gotrue服务端的oauth2客户端库
Readme
goauth2
一个基于gotrue服务端的oauth2客户端库
安装
pnpm add goauth2@workspace:*const config = {
oauth2: {
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'email',
endpoint: {
authURL: '',
tokenURL: '',
refreshURL: '',
userURL: "",
deviceAuthURL: ""
}
},
cache: {
location: 'localStorage',
}
}
const oauth2Config = new OAuth2Config(oauth2)
const store = new BrowserSession(oauth2.clientId, cache.location)
const client = new Oauth2Client(oauth2Config, store)