easy-social-auth
Version:
A flexible, standalone package for social authentication using Google, Facebook & Twitter
18 lines (17 loc) • 984 B
TypeScript
import { IRedditConfig } from "../interfaces/config.interface";
import { SocialAuthResponse } from "../interfaces/easy-social-auth-response.interface";
import { ISocialUser } from "../interfaces/social-user.interface";
import { AuthStrategy } from "./easy-social-auth.strategy";
import { TokenTypeEnum } from "../enums/token-type.enum";
export declare class RedditStrategy extends AuthStrategy {
private readonly config;
constructor(config: IRedditConfig);
private get clientAuthorizationHeader();
private makeRequest;
private postToTokenEndPoint;
requestAppToken(): Promise<SocialAuthResponse<string>>;
exchangeCodeForToken(code: string, redirectUri: string): Promise<SocialAuthResponse<any>>;
refreshAccessToken(refreshToken: string): Promise<SocialAuthResponse<string>>;
revokeToken(token: string, tokenType?: TokenTypeEnum): Promise<SocialAuthResponse<string>>;
getUserData(accessToken: string): Promise<SocialAuthResponse<ISocialUser>>;
}