blob: 15993bb56d8ae29d6d7fa253c38ea49ffd597c02 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:google_sign_in_platform_interface/google_sign_in_platform_interface.dart';
// Creates the JS representation of some user data
String googleUser(GoogleSignInUserData data) => '''
{
getBasicProfile: () => {
return {
getName: () => '${data.displayName}',
getEmail: () => '${data.email}',
getId: () => '${data.id}',
getImageUrl: () => '${data.photoUrl}',
};
},
getAuthResponse: () => {
return {
id_token: '${data.idToken}',
access_token: 'access_${data.idToken}',
}
},
getGrantedScopes: () => 'some scope',
grant: () => true,
}
''';