Refreshable connections, refactoring, access-token endpoint
- Aded /users/@me/connections/:connection_name/:connection_id/access-token - Replaced `access_token` property on ConnectedAccount with `token_data` object for refreshing tokens - Made a common interface for connection things like ComonOAuthTokenResponse - Added `RefreshableConnection` class - Added token refresh to Spotify connection (disabled)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm";
|
||||
import { ConnectedAccountTokenData } from "../interfaces";
|
||||
import { BaseClass } from "./BaseClass";
|
||||
import { User } from "./User";
|
||||
|
||||
@@ -40,9 +41,6 @@ export class ConnectedAccount extends BaseClass {
|
||||
})
|
||||
user: User;
|
||||
|
||||
@Column({ select: false, nullable: true })
|
||||
access_token?: string;
|
||||
|
||||
@Column({ select: false })
|
||||
friend_sync?: boolean = false;
|
||||
|
||||
@@ -75,4 +73,7 @@ export class ConnectedAccount extends BaseClass {
|
||||
|
||||
@Column()
|
||||
two_way_link?: boolean = false;
|
||||
|
||||
@Column({ select: false, nullable: true, type: "simple-json" })
|
||||
token_data?: ConnectedAccountTokenData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user