github oauth2 login / gitee oauth2 login

This commit is contained in:
landaiqing
2024-08-19 00:14:37 +08:00
parent 0c3edc360c
commit 8998259791
8 changed files with 231 additions and 31 deletions

18
src/api/oauth/github.ts Normal file
View File

@@ -0,0 +1,18 @@
import {service} from "@/utils/alova/service.ts";
/**
* Get Github OAuth URL
*/
export const getGithubUrl = () => {
return service.Get('/api/oauth/github/get_url',
{
meta: {
ignoreToken: true,
},
cacheFor: {
mode: "restore",
expire: 1000 * 60 * 60 * 24 * 30 // 30 days
}
}
);
};