Skip to content

Instantly share code, notes, and snippets.

@tobinbc
Created August 4, 2019 18:45
Show Gist options
  • Save tobinbc/7589cbbcce30867385580038e969154f to your computer and use it in GitHub Desktop.
Save tobinbc/7589cbbcce30867385580038e969154f to your computer and use it in GitHub Desktop.
import { Component, OnInit } from '@angular/core';
const env = {
client_id: '1r7gunokp2d5s3no71r4858o3o',
redirect_uri: 'http://localhost:8100/authevent/loggedin',
cognito_custom_domain: 'awesomeauth.auth.eu-west-2.amazoncognito.com'
}
@Component({
selector: 'app-auth-login-button',
template: `
<ion-item [href]="loginButtonHref">
<ion-icon slot="start" color="medium" name="google"></ion-icon>
<ion-label>Google</ion-label>
</ion-item>`
})
export class AuthLoginButtonComponent implements OnInit {
loginButtonHref = `https://${env.cognito_custom_domain}/login?response_type=code&client_id=${env.client_id}&redirect_uri=${env.redirect_uri}`
constructor() {}
ngOnInit() { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment