本文整理汇总了TypeScript中angularfire2.firebaseAuthConfig函数的典型用法代码示例。如果您正苦于以下问题:TypeScript firebaseAuthConfig函数的具体用法?TypeScript firebaseAuthConfig怎么用?TypeScript firebaseAuthConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了firebaseAuthConfig函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: main
export function main(initialHmrState?: any): Promise<any> {
return bootstrap(App, [
...PROVIDERS,
...ENV_PROVIDERS,
...DIRECTIVES,
...PIPES,
...APP_PROVIDERS,
FIREBASE_PROVIDERS,
defaultFirebase('https://statistigs.firebaseio.com'),
firebaseAuthConfig({
provider: AuthProviders.Twitter,
method: AuthMethods.Redirect
})
])
.catch(err => console.error(err));
}
示例2: ngApp
export function ngApp() {
return bootstrap(App, [
...HTTP_PROVIDERS,
FIREBASE_PROVIDERS,
// Initialize Firebase app
defaultFirebase({
apiKey: "AIzaSyC75MzDIVaPQMX4T0RaJg6N5N5pE938dMA",
authDomain: "portfolio-c9844.firebaseapp.com",
databaseURL: "https://portfolio-c9844.firebaseio.com",
storageBucket: "portfolio-c9844.appspot.com",
}),
firebaseAuthConfig({
provider: AuthProviders.Password,
method: AuthMethods.Password,
}),
provideRouter(routes)
]);
}
示例3: ngApp
export function ngApp(req, res) {
let baseUrl = '/';
let url = req.originalUrl || '/';
let config: ExpressEngineConfig = {
directives: [
App
],
platformProviders: [
{provide: ORIGIN_URL, useValue: 'http://localhost:3000'},
{provide: APP_BASE_HREF, useValue: baseUrl},
],
providers: [
{provide: REQUEST_URL, useValue: url},
NODE_HTTP_PROVIDERS,
provideRouter(routes),
NODE_LOCATION_PROVIDERS,
FIREBASE_PROVIDERS,
// Initialize Firebase app
defaultFirebase({
apiKey: "AIzaSyC75MzDIVaPQMX4T0RaJg6N5N5pE938dMA",
authDomain: "portfolio-c9844.firebaseapp.com",
databaseURL: "https://portfolio-c9844.firebaseio.com",
storageBucket: "portfolio-c9844.appspot.com",
}),
firebaseAuthConfig({
provider: AuthProviders.Password,
method: AuthMethods.Password,
}),
],
async: true,
preboot: false // { appRoot: 'app' } // your top level app component selector
};
res.render('index', config);
}
示例4: enableProdMode
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
import {enableProdMode} from '@angular/core';
import {disableDeprecatedForms, provideForms} from '@angular/forms';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig} from 'angularfire2';
import {AppComponent} from './components/app/app.component';
import {APP_ROUTER_PROVIDERS} from './components/app/app.routes';
import {FIREBASE_AUTH_CONFIG, FIREBASE_CONFIG} from './configs/firebase.config';
import {AuthenticationService} from './services/authentication.service';
import {RoutingService} from './services/routing.service';
import {TaskListService} from './services/taskList.service';
if (process.env.ENV === 'production') {
enableProdMode();
}
bootstrap(AppComponent as any, [
FIREBASE_PROVIDERS,
APP_ROUTER_PROVIDERS,
{provide: LocationStrategy, useClass: HashLocationStrategy},
defaultFirebase(FIREBASE_CONFIG),
firebaseAuthConfig(FIREBASE_AUTH_CONFIG),
disableDeprecatedForms(),
provideForms(),
AuthenticationService,
RoutingService,
TaskListService
]);
示例5: enableProdMode
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { PruebasAppComponent, environment } from './app/';
import {FIREBASE_PROVIDERS,
defaultFirebase,
AngularFire,
AuthMethods,
AuthProviders,
firebaseAuthConfig} from 'angularfire2';
if (environment.production) {
enableProdMode();
}
bootstrap(PruebasAppComponent, [
FIREBASE_PROVIDERS,
defaultFirebase('https://pruebasangular2.firebaseio.com/'),
firebaseAuthConfig({
provider: AuthProviders.Google,
method: AuthMethods.Redirect
})
]);
示例6: enableProdMode
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { Angularfire2IpponAppComponent, environment } from './app/';
import { FIREBASE_PROVIDERS, defaultFirebase, AuthMethods, AuthProviders, firebaseAuthConfig } from 'angularfire2';
if (environment.production) {
enableProdMode();
}
bootstrap(Angularfire2IpponAppComponent, [
FIREBASE_PROVIDERS,
defaultFirebase('https://popping-fire-9851.firebaseio.com/'),
firebaseAuthConfig({
provider: AuthProviders.Twitter,
method: AuthMethods.Redirect
})
]);
示例7: enableProdMode
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode, provide } from '@angular/core';
import { ROUTER_PROVIDERS } from '@angular/router';
import { HTTP_PROVIDERS, JSONP_PROVIDERS } from '@angular/http';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
import { NexusAppComponent, environment } from './app/';
import { FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthMethods, AuthProviders } from 'angularfire2';
import { ANGULAR2_GOOGLE_MAPS_PROVIDERS } from 'angular2-google-maps/core';
if (environment.production) {
enableProdMode();
}
bootstrap(
NexusAppComponent, [
ROUTER_PROVIDERS,
JSONP_PROVIDERS,
HTTP_PROVIDERS,
provide(LocationStrategy, {useClass: HashLocationStrategy}),
FIREBASE_PROVIDERS,
defaultFirebase('https://gdgnexus.firebaseio.com'),
firebaseAuthConfig({
method: AuthMethods.OAuthToken,
provider: AuthProviders.Google
}),
ANGULAR2_GOOGLE_MAPS_PROVIDERS
]
);
示例8: defaultFirebase
// Firebase Angular2 adapter
FIREBASE_PROVIDERS,
// angularfire2 beta 0
// defaultFirebase("https://crackling-heat-2871.firebaseio.com"),
// angularfire2 beta 2
defaultFirebase({
apiKey: "AIzaSyA0gBTBwU7x2m6dQVOormHdf8UnifI7Tu4",
authDomain: "crackling-heat-2871.firebaseapp.com",
databaseURL: "https://crackling-heat-2871.firebaseio.com", // "https://teacher-agenda-812ca.firebaseio.com"
storageBucket: "crackling-heat-2871.appspot.com",
}),
// TODO test and replace by a better auth config
firebaseAuthConfig({
provider: AuthProviders.Password,
method: AuthMethods.Password
// scope: ['email']
// If authenticated with same email, for different providers, they may be linked:
// https://firebase.google.com/docs/auth/web/github-auth#popup-mode
}),
provide(TranslateLoader, {
useFactory: (http: Http) => new TranslateStaticLoader(http, 'assets/i18n', '.json'),
deps: [Http]
}),
// If the default behavior (fallback to default language, then to the key) is not good enough:
// provide(MissingTranslationHandler, { useClass: MyMissingTranslationHandler }),
TranslateService,
// Global pipes
// http://stackoverflow.com/questions/35044068/is-it-possible-to-override-the-built-in-angular-2-pipes-so-they-can-be-used-glob
// For directives: https://forum.ionicframework.com/t/how-to-make-custom-pipes-application-wide/42843/10
示例9: enableProdMode
AuthProviders,
FIREBASE_PROVIDERS,
firebaseAuthConfig,
defaultFirebase } from 'angularfire2';
import { AppComponent, environment } from './app/';
import { APP_ROUTER_PROVIDER } from './app/app.routes';
if (environment.production) {
enableProdMode();
}
bootstrap(AppComponent, [
disableDeprecatedForms(),
provideForms(),
APP_ROUTER_PROVIDER,
FIREBASE_PROVIDERS,
// Initialize Firebase app
defaultFirebase({
apiKey: "AIzaSyDiNHqJA8aBurA4huOeayaPxqAsK3iP-ys",
authDomain: "angfire2-chat.firebaseapp.com",
databaseURL: "https://angfire2-chat.firebaseio.com",
storageBucket: "angfire2-chat.appspot.com",
}),
firebaseAuthConfig({
provider: AuthProviders.Google,
method: AuthMethods.Redirect,
remember: 'default',
scope: ['https://www.googleapis.com/auth/plus.login']
})
]);;
示例10: enableProdMode
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { PoohAppComponent, environment } from './app/';
import { FIREBASE_PROVIDERS,
defaultFirebase,
AngularFire,
AuthMethods,
AuthProviders,
firebaseAuthConfig } from 'angularfire2';
if (environment.production) {
enableProdMode();
}
bootstrap(PoohAppComponent, [
FIREBASE_PROVIDERS,
defaultFirebase('https://pooh-8d41c.firebaseio.com/'), firebaseAuthConfig({
provider: AuthProviders.Password,
method: AuthMethods.Password
}),
]);