@@ -125,12 +84,12 @@ import { Observable } from 'rxjs';
`,
- styles: []
+ styles: [],
})
export class HomeComponent {
private auth = inject(Auth);
user$: Observable = authState(this.auth);
-
+
signOut() {
this.auth.signOut();
}
diff --git a/examples/angular/src/app/home/index.ts b/examples/angular/src/app/home/index.ts
index 328ded55..099bc938 100644
--- a/examples/angular/src/app/home/index.ts
+++ b/examples/angular/src/app/home/index.ts
@@ -14,4 +14,4 @@
* limitations under the License.
*/
-export * from './home.component';
+export * from "./home.component";
diff --git a/examples/angular/src/app/policies/policy.config.ts b/examples/angular/src/app/policies/policy.config.ts
index b4ad6815..f1db00d7 100644
--- a/examples/angular/src/app/policies/policy.config.ts
+++ b/examples/angular/src/app/policies/policy.config.ts
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-import { InjectionToken } from '@angular/core';
+import { InjectionToken } from "@angular/core";
export interface PolicyConfig {
termsOfServiceUrl: string;
privacyPolicyUrl: string;
}
-export const POLICY_CONFIG = new InjectionToken('PolicyConfig');
+export const POLICY_CONFIG = new InjectionToken("PolicyConfig");
diff --git a/examples/angular/src/app/policies/providePolicies.ts b/examples/angular/src/app/policies/providePolicies.ts
index 754f6f39..78cfe79e 100644
--- a/examples/angular/src/app/policies/providePolicies.ts
+++ b/examples/angular/src/app/policies/providePolicies.ts
@@ -15,15 +15,15 @@
*/
// src/app/policies/providePolicies.ts
-import { Provider } from '@angular/core';
-import { POLICY_CONFIG, PolicyConfig } from './policy.config';
+import { Provider } from "@angular/core";
+import { POLICY_CONFIG, PolicyConfig } from "./policy.config";
export function providePolicies(): Provider {
return {
provide: POLICY_CONFIG,
useValue: {
- termsOfServiceUrl: 'https://yourdomain.com/terms',
- privacyPolicyUrl: 'https://yourdomain.com/privacy',
+ termsOfServiceUrl: "https://yourdomain.com/terms",
+ privacyPolicyUrl: "https://yourdomain.com/privacy",
} satisfies PolicyConfig,
};
}
diff --git a/examples/angular/src/main.server.ts b/examples/angular/src/main.server.ts
index 0577da24..aa5749a0 100644
--- a/examples/angular/src/main.server.ts
+++ b/examples/angular/src/main.server.ts
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-import { bootstrapApplication } from '@angular/platform-browser';
-import { AppComponent } from './app/app.component';
-import { config } from './app/app.config.server';
+import { bootstrapApplication } from "@angular/platform-browser";
+import { AppComponent } from "./app/app.component";
+import { config } from "./app/app.config.server";
const bootstrap = () => bootstrapApplication(AppComponent, config);
diff --git a/examples/angular/src/main.ts b/examples/angular/src/main.ts
index 0e450bde..c846a576 100644
--- a/examples/angular/src/main.ts
+++ b/examples/angular/src/main.ts
@@ -14,9 +14,8 @@
* limitations under the License.
*/
-import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app/app.config';
-import { AppComponent } from './app/app.component';
+import { bootstrapApplication } from "@angular/platform-browser";
+import { appConfig } from "./app/app.config";
+import { AppComponent } from "./app/app.component";
-bootstrapApplication(AppComponent, appConfig)
- .catch((err) => console.error(err));
+bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));
diff --git a/examples/angular/src/server.ts b/examples/angular/src/server.ts
index 8ded1a83..0e635d44 100644
--- a/examples/angular/src/server.ts
+++ b/examples/angular/src/server.ts
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-import { APP_BASE_HREF } from '@angular/common';
-import { CommonEngine, isMainModule } from '@angular/ssr/node';
-import express from 'express';
-import { dirname, join, resolve } from 'node:path';
-import { fileURLToPath } from 'node:url';
-import bootstrap from './main.server';
+import { APP_BASE_HREF } from "@angular/common";
+import { CommonEngine, isMainModule } from "@angular/ssr/node";
+import express from "express";
+import { dirname, join, resolve } from "node:path";
+import { fileURLToPath } from "node:url";
+import bootstrap from "./main.server";
const serverDistFolder = dirname(fileURLToPath(import.meta.url));
-const browserDistFolder = resolve(serverDistFolder, '../browser');
-const indexHtml = join(serverDistFolder, 'index.server.html');
+const browserDistFolder = resolve(serverDistFolder, "../browser");
+const indexHtml = join(serverDistFolder, "index.server.html");
const app = express();
const commonEngine = new CommonEngine();
@@ -44,17 +44,17 @@ const commonEngine = new CommonEngine();
* Serve static files from /browser
*/
app.get(
- '**',
+ "**",
express.static(browserDistFolder, {
- maxAge: '1y',
- index: 'index.html'
- }),
+ maxAge: "1y",
+ index: "index.html",
+ })
);
/**
* Handle all other requests by rendering the Angular application.
*/
-app.get('**', (req, res, next) => {
+app.get("**", (req, res, next) => {
const { protocol, originalUrl, baseUrl, headers } = req;
commonEngine
@@ -74,7 +74,7 @@ app.get('**', (req, res, next) => {
* The server listens on the port defined by the `PORT` environment variable, or defaults to 4000.
*/
if (isMainModule(import.meta.url)) {
- const port = process.env['PORT'] || 4000;
+ const port = process.env["PORT"] || 4000;
app.listen(port, () => {
console.log(`Node Express server listening on http://localhost:${port}`);
});
diff --git a/examples/angular/src/styles.css b/examples/angular/src/styles.css
index 2929acf1..5c046d63 100644
--- a/examples/angular/src/styles.css
+++ b/examples/angular/src/styles.css
@@ -16,4 +16,4 @@
/* You can add global styles to this file, and also import other style files */
@import "tailwindcss";
-@import "@firebase-ui/styles/src/base.css";
\ No newline at end of file
+@import "@firebase-ui/styles/src/base.css";
diff --git a/examples/angular/tsconfig.app.json b/examples/angular/tsconfig.app.json
index 9ab8527b..d2329c51 100644
--- a/examples/angular/tsconfig.app.json
+++ b/examples/angular/tsconfig.app.json
@@ -4,16 +4,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
- "types": [
- "node"
- ]
+ "types": ["node"]
},
- "files": [
- "src/main.ts",
- "src/main.server.ts",
- "src/server.ts"
- ],
- "include": [
- "src/**/*.d.ts"
- ]
+ "files": ["src/main.ts", "src/main.server.ts", "src/server.ts"],
+ "include": ["src/**/*.d.ts"]
}
diff --git a/examples/angular/tsconfig.json b/examples/angular/tsconfig.json
index 414ea278..c5850139 100644
--- a/examples/angular/tsconfig.json
+++ b/examples/angular/tsconfig.json
@@ -17,7 +17,7 @@
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
- "baseUrl": ".",
+ "baseUrl": "."
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
diff --git a/examples/angular/tsconfig.spec.json b/examples/angular/tsconfig.spec.json
index abe45975..aca82878 100644
--- a/examples/angular/tsconfig.spec.json
+++ b/examples/angular/tsconfig.spec.json
@@ -4,14 +4,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
- "types": [
- "jasmine"
- ]
+ "types": ["jasmine"]
},
- "include": [
- "src/**/*.spec.ts",
- "src/**/*.d.ts",
- "projects/**/*.spec.ts",
- "projects/**/*.d.ts"
- ]
-}
\ No newline at end of file
+ "include": ["src/**/*.spec.ts", "src/**/*.d.ts", "projects/**/*.spec.ts", "projects/**/*.d.ts"]
+}
diff --git a/examples/nextjs/.prettierrc b/examples/nextjs/.prettierrc
new file mode 100644
index 00000000..37702140
--- /dev/null
+++ b/examples/nextjs/.prettierrc
@@ -0,0 +1,9 @@
+{
+ "semi": true,
+ "trailingComma": "es5",
+ "singleQuote": false,
+ "printWidth": 120,
+ "tabWidth": 2,
+ "useTabs": false,
+ "endOfLine": "auto"
+}
diff --git a/examples/nextjs/app/forgot-password/screen.tsx b/examples/nextjs/app/forgot-password/screen.tsx
index 2cc97888..f98c5758 100644
--- a/examples/nextjs/app/forgot-password/screen.tsx
+++ b/examples/nextjs/app/forgot-password/screen.tsx
@@ -22,7 +22,5 @@ import { useRouter } from "next/navigation";
export default function Screen() {
const router = useRouter();
- return (
- router.push("/sign-in")} />
- );
+ return router.push("/sign-in")} />;
}
diff --git a/examples/nextjs/app/globals.css b/examples/nextjs/app/globals.css
index fd915417..731524bd 100644
--- a/examples/nextjs/app/globals.css
+++ b/examples/nextjs/app/globals.css
@@ -18,4 +18,4 @@
@import "@firebase-ui/styles/src/base.css";
/* @import "@firebase-ui/styles/src/themes/dark.css"; */
-/* @import "@firebase-ui/styles/src/themes/brutalist.css"; */
\ No newline at end of file
+/* @import "@firebase-ui/styles/src/themes/brutalist.css"; */
diff --git a/examples/nextjs/app/layout.tsx b/examples/nextjs/app/layout.tsx
index 8c282b99..e34f4639 100644
--- a/examples/nextjs/app/layout.tsx
+++ b/examples/nextjs/app/layout.tsx
@@ -46,9 +46,7 @@ export default async function RootLayout({
return (
-
+
{children}
diff --git a/examples/nextjs/app/page.tsx b/examples/nextjs/app/page.tsx
index 84f16212..3e60dfe0 100644
--- a/examples/nextjs/app/page.tsx
+++ b/examples/nextjs/app/page.tsx
@@ -25,97 +25,62 @@ export default function Home() {
return (
Firebase UI Demo
-
- {user &&
Welcome: {user.email || user.phoneNumber}
}
-
+
{user &&
Welcome: {user.email || user.phoneNumber}
}
Auth Screens
-
+
Sign In Auth Screen
-
+
Sign In Auth Screen with Handlers
-
+
Sign In Auth Screen with OAuth
-
+
Email Link Auth Screen
-
+
Email Link Auth Screen with OAuth
-
+
Phone Auth Screen
-
+
Phone Auth Screen with OAuth
-
+
Sign Up Auth Screen
-
+
Sign Up Auth Screen with OAuth
-
+
OAuth Screen
-
+
Password Reset Screen
diff --git a/examples/nextjs/app/screens/password-reset-screen/page.tsx b/examples/nextjs/app/screens/password-reset-screen/page.tsx
index 0bea4b34..f81d1c7d 100644
--- a/examples/nextjs/app/screens/password-reset-screen/page.tsx
+++ b/examples/nextjs/app/screens/password-reset-screen/page.tsx
@@ -19,9 +19,5 @@
import { PasswordResetScreen } from "@firebase-ui/react";
export default function PasswordResetScreenPage() {
- return (
- {}}
- />
- );
+ return {}} />;
}
diff --git a/examples/nextjs/app/screens/sign-in-auth-screen-w-handlers/page.tsx b/examples/nextjs/app/screens/sign-in-auth-screen-w-handlers/page.tsx
index a968d8e7..6299fd5f 100644
--- a/examples/nextjs/app/screens/sign-in-auth-screen-w-handlers/page.tsx
+++ b/examples/nextjs/app/screens/sign-in-auth-screen-w-handlers/page.tsx
@@ -19,10 +19,5 @@
import { SignInAuthScreen } from "@firebase-ui/react";
export default function SignInAuthScreenWithHandlersPage() {
- return (
- {}}
- onRegisterClick={() => {}}
- />
- );
+ return {}} onRegisterClick={() => {}} />;
}
diff --git a/examples/nextjs/lib/components/header.tsx b/examples/nextjs/lib/components/header.tsx
index 4e43e331..8de069ce 100644
--- a/examples/nextjs/lib/components/header.tsx
+++ b/examples/nextjs/lib/components/header.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-'use client';
+"use client";
import Link from "next/link";
import { useUser } from "../firebase/hooks";
@@ -39,10 +39,18 @@ export function Header(props: { currentUser: User | null }) {
- {user ? :
Sign In
}
+ {user ? (
+
+
+
+ ) : (
+
+ Sign In
+
+ )}
);
-}
\ No newline at end of file
+}
diff --git a/examples/nextjs/lib/examples/1/page.tsx b/examples/nextjs/lib/examples/1/page.tsx
index 2ab4ec19..7ab2e03d 100644
--- a/examples/nextjs/lib/examples/1/page.tsx
+++ b/examples/nextjs/lib/examples/1/page.tsx
@@ -71,9 +71,7 @@ export default function Example1() {
Create Account
-
- Join thousands of users worldwide
-
+
Join thousands of users worldwide
@@ -86,9 +84,7 @@ export default function Example1() {
Welcome Back
-
- Sign in to your account to continue
-
+
Sign in to your account to continue
{}} />
@@ -98,9 +94,7 @@ export default function Example1() {
New Here?
-
- Create an account and get access to all features
-