Merge pull request #115 from NicolasConstant/develop

0.10.1
This commit is contained in:
Nicolas Constant 2019-06-14 20:00:15 -04:00 committed by GitHub
commit 1f1a86c692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sengi",
"version": "0.10.0",
"version": "0.10.1",
"license": "AGPL-3.0-or-later",
"main": "main-electron.js",
"description": "A multi-account desktop client for Mastodon and Pleroma",

View File

@ -5,7 +5,7 @@ import { AppData, TokenData } from "./models/mastodon.interfaces";
@Injectable()
export class AuthService {
export class AuthService {
private apiRoutes = new ApiRoutes();
constructor(
@ -13,7 +13,7 @@ export class AuthService {
}
getInstanceLoginUrl(instance: string, client_id: string, redirect_uri: string): string{
return `https://${instance}/oauth/authorize?scope=${encodeURIComponent('read write follow')}&response_type=code&redirect_uri=${encodeURIComponent(redirect_uri)}&client_id=${client_id}`;
return `https://${instance}/oauth/authorize?scope=${encodeURIComponent('read write follow')}&response_type=code&redirect_uri=${encodeURIComponent(redirect_uri)}&client_id=${client_id}&force_login=true`;
}
getToken(instance: string, client_id: string, client_secret: string, code: string, redirect_uri: string): Promise<TokenData> {