feat: your authorization
This commit is contained in:
@ -2,7 +2,7 @@ import { YggdrasilClient, YggrasilAuthentication } from '@xmcl/user';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
// Ely.by сервер
|
||||
const ELY_BY_AUTH_SERVER = 'https://authserver.ely.by';
|
||||
const ELY_BY_AUTH_SERVER = 'http://127.0.0.1:8000';
|
||||
|
||||
export class AuthService {
|
||||
private client: YggdrasilClient;
|
||||
@ -49,6 +49,7 @@ export class AuthService {
|
||||
|
||||
async validate(accessToken: string, clientToken: string): Promise<boolean> {
|
||||
try {
|
||||
console.log(accessToken, clientToken);
|
||||
const response = await fetch(`${ELY_BY_AUTH_SERVER}/auth/validate`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user