Created
October 11, 2019 16:33
-
-
Save umutyerebakmaz/593b1baeedb27cbb286aa3cc52752161 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable, OnInit } from '@angular/core'; | |
import { AccountsClient } from '@accounts/client'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class LoginService implements OnInit { | |
public userLoginStatus = 'defaultLoginData'; | |
constructor(private accountsClient: AccountsClient) {} | |
ngOnInit() { | |
console.log('login service worked!'); | |
} | |
async getTokens() { | |
const tokens = await this.accountsClient.getTokens(); | |
if (tokens) { | |
return this.userLoginStatus = 'true'; | |
} | |
return this.userLoginStatus = 'false'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment