diff --git a/docs/06-concepts/10-modules.md b/docs/06-concepts/10-modules.md index 442b0747..2967951c 100644 --- a/docs/06-concepts/10-modules.md +++ b/docs/06-concepts/10-modules.md @@ -29,18 +29,16 @@ modules: nickname: auth ``` -Then run `pub get` and `serverpod generate` from your server's directory (e.g., `mypod_server`) to add the module to your project's deserializer. +Then run `pub get` from your server's directory (e.g., `mypod_server`): ```bash $ dart pub get -$ serverpod generate ``` -Finally, since modules might include modifications to the database schema, you should create a new database migration and apply it by running `serverpod create-migration` then `dart bin/main.dart --apply-migrations` from your server's directory. +Start the server to wire up the module and apply any database changes it brings: ```bash -$ serverpod create-migration -$ dart bin/main.dart --apply-migrations +$ serverpod start ``` ### Client setup diff --git a/docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md b/docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md index b9c4b2c3..e797dd0c 100644 --- a/docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md +++ b/docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md @@ -145,14 +145,12 @@ import 'package:serverpod_auth_idp_server/providers/google.dart'; class GoogleIdpEndpoint extends GoogleIdpBaseEndpoint {} ``` -### Generate code and apply migrations +### Start the server -Run the following commands from your server project directory (e.g., `my_project_server/`) to generate client code and apply the database migration: +Start the server from your server project directory (e.g., `my_project_server/`): ```bash -serverpod generate -serverpod create-migration -dart run bin/main.dart --apply-migrations +serverpod start ``` :::warning @@ -244,7 +242,7 @@ On web, Google completes sign-in by redirecting the browser to a callback URL yo ```bash flutter build web --output ../my_project_server/web/app # from your Flutter project -dart run bin/main.dart # from your server project +serverpod start # from your server project ``` Open `http://localhost:8082/app` to test. `flutter run -d chrome` won't work here because Flutter's dev server runs on a different port from Serverpod — for hot-reload workflows, use the [separately-hosted Flutter web](./customizations#separately-hosted-flutter-web) flow instead. diff --git a/docs/06-concepts/11-authentication/04-providers/03-google/04-troubleshooting.md b/docs/06-concepts/11-authentication/04-providers/03-google/04-troubleshooting.md index 16a66d25..df1a6bdc 100644 --- a/docs/06-concepts/11-authentication/04-providers/03-google/04-troubleshooting.md +++ b/docs/06-concepts/11-authentication/04-providers/03-google/04-troubleshooting.md @@ -21,7 +21,7 @@ Go through this before investigating a specific error. Most problems come from a - [ ] For new or customized servers, confirm auth services and JWT are configured per [Authentication setup](../../setup#identity-providers-configuration) before adding Google. - [ ] Add `GoogleIdpConfigFromPasswords()` to `identityProviderBuilders` in `server.dart`. - [ ] Create a `GoogleIdpEndpoint` file in `lib/src/auth/`. -- [ ] Run `serverpod generate`, then `serverpod create-migration`, then apply migrations using `--apply-migrations`. +- [ ] Started the server with `serverpod start`. #### Client @@ -172,9 +172,7 @@ Every line of the JSON must be indented by at least one level more than `googleC **Resolution:** Create and apply the migration: ```bash -serverpod generate -serverpod create-migration -dart run bin/main.dart --apply-migrations +serverpod start ``` ## Lightweight sign-in (One Tap) not appearing diff --git a/docs/06-concepts/11-authentication/04-providers/04-apple/01-setup.md b/docs/06-concepts/11-authentication/04-providers/04-apple/01-setup.md index b7e24df9..736ab17c 100644 --- a/docs/06-concepts/11-authentication/04-providers/04-apple/01-setup.md +++ b/docs/06-concepts/11-authentication/04-providers/04-apple/01-setup.md @@ -166,14 +166,12 @@ import 'package:serverpod_auth_idp_server/providers/apple.dart'; class AppleIdpEndpoint extends AppleIdpBaseEndpoint {} ``` -### Generate code and apply migrations +### Start the server -Run the following commands from your server project directory (e.g., `my_project_server/`) to generate client code and apply the database migration: +Start the server from your server project directory (e.g., `my_project_server/`): ```bash -serverpod generate -serverpod create-migration -dart run bin/main.dart --apply-migrations +serverpod start ``` :::note diff --git a/docs/06-concepts/11-authentication/04-providers/04-apple/04-troubleshooting.md b/docs/06-concepts/11-authentication/04-providers/04-apple/04-troubleshooting.md index cea085a7..38ef08b1 100644 --- a/docs/06-concepts/11-authentication/04-providers/04-apple/04-troubleshooting.md +++ b/docs/06-concepts/11-authentication/04-providers/04-apple/04-troubleshooting.md @@ -23,7 +23,7 @@ Go through this before investigating a specific error. Most problems come from a * [ ] Add `AppleIdpConfigFromPasswords()` to `identityProviderBuilders` in `server.dart`. * [ ] Call **`pod.configureAppleIdpRoutes(...)`** on the server before the pod starts. * [ ] Create an `AppleIdpEndpoint` file in `lib/src/auth/`. -* [ ] Run **`serverpod generate`**, then apply migrations using `--apply-migrations`. +* [ ] Started the server with `serverpod start`. #### Client @@ -124,9 +124,7 @@ If you use `--dart-define`, confirm `APPLE_SERVICE_IDENTIFIER` is the Services I **Resolution:** Create and apply the migration: ```bash -serverpod generate -serverpod create-migration -dart run bin/main.dart --apply-migrations +serverpod start ``` ## Apple rejects the redirect URI with `invalid_request` diff --git a/docs/06-concepts/11-authentication/04-providers/06-firebase/01-setup.md b/docs/06-concepts/11-authentication/04-providers/06-firebase/01-setup.md index 47bae597..fb1d9031 100644 --- a/docs/06-concepts/11-authentication/04-providers/06-firebase/01-setup.md +++ b/docs/06-concepts/11-authentication/04-providers/06-firebase/01-setup.md @@ -134,14 +134,12 @@ import 'package:serverpod_auth_idp_server/providers/firebase.dart'; class FirebaseIdpEndpoint extends FirebaseIdpBaseEndpoint {} ``` -### 3. Generate code and apply migrations +### 3. Start the server -Run the following commands from your server project directory (e.g., `my_project_server/`) to generate client code and apply the database migration: +Start the server from your server project directory (e.g., `my_project_server/`): ```bash -serverpod generate -serverpod create-migration -dart run bin/main.dart --apply-migrations +serverpod start ``` :::note diff --git a/docs/06-concepts/11-authentication/04-providers/06-firebase/05-troubleshooting.md b/docs/06-concepts/11-authentication/04-providers/06-firebase/05-troubleshooting.md index a6ec87fe..41dceb64 100644 --- a/docs/06-concepts/11-authentication/04-providers/06-firebase/05-troubleshooting.md +++ b/docs/06-concepts/11-authentication/04-providers/06-firebase/05-troubleshooting.md @@ -21,7 +21,7 @@ Go through this before investigating a specific error. Most problems come from a - [ ] Confirm the `project_id` inside `firebaseServiceAccountKey` matches the Firebase project the client is using. - [ ] Add `FirebaseIdpConfigFromPasswords()` to `identityProviderBuilders` in `server.dart`. - [ ] Create a `FirebaseIdpEndpoint` file in `lib/src/auth/` extending `FirebaseIdpBaseEndpoint`. -- [ ] Run **`serverpod generate`**, then **`serverpod create-migration`**, then apply migrations with `dart run bin/main.dart --apply-migrations`. +- [ ] Run **`serverpod generate`**, then **`serverpod create-migration`**, then start the server with `serverpod start`. #### Client @@ -41,9 +41,7 @@ Go through this before investigating a specific error. Most problems come from a **Resolution:** Create and apply the migration: ```bash -serverpod generate -serverpod create-migration -dart run bin/main.dart --apply-migrations +serverpod start ``` ## Token verification fails with "invalid signature" @@ -109,7 +107,7 @@ If you haven't run `flutterfire configure`, do so to generate the `firebase_opti 1. **Missing service account key:** The `firebaseServiceAccountKey` is not present in `passwords.yaml`, or the JSON is invalid. 2. **Missing endpoint:** You did not create the endpoint class extending `FirebaseIdpBaseEndpoint`. Without it, the client has no endpoint to call. -3. **Missing migration:** The provider's database tables don't exist yet. Apply migrations with `dart run bin/main.dart --apply-migrations`. +3. **Missing migration:** The provider's database tables don't exist yet. Start the server with `serverpod start`. 4. **Project mismatch:** The service account key belongs to a different Firebase project than the one configured in your Flutter app. Compare `project_id` in `firebaseServiceAccountKey` against the project in `firebase_options.dart`. 5. **App Check enabled prematurely:** If you enabled Firebase App Check before the client integration is in place, every request will be rejected with an App Check assertion error. Disable App Check until the client is wired up. diff --git a/docs/06-concepts/11-authentication/04-providers/07-github/01-setup.md b/docs/06-concepts/11-authentication/04-providers/07-github/01-setup.md index 4dc76911..7a20f2c4 100644 --- a/docs/06-concepts/11-authentication/04-providers/07-github/01-setup.md +++ b/docs/06-concepts/11-authentication/04-providers/07-github/01-setup.md @@ -140,14 +140,12 @@ import 'package:serverpod_auth_idp_server/providers/github.dart'; class GitHubIdpEndpoint extends GitHubIdpBaseEndpoint {} ``` -### Generate code and apply migrations +### Start the server -Run the following commands from your server project directory (e.g., `my_project_server/`) to generate client code and apply the database migration: +Start the server from your server project directory (e.g., `my_project_server/`): ```bash -serverpod generate -serverpod create-migration -dart run bin/main.dart --apply-migrations +serverpod start ``` :::warning diff --git a/docs/06-concepts/11-authentication/04-providers/07-github/04-troubleshooting.md b/docs/06-concepts/11-authentication/04-providers/07-github/04-troubleshooting.md index f1f60777..367301b7 100644 --- a/docs/06-concepts/11-authentication/04-providers/07-github/04-troubleshooting.md +++ b/docs/06-concepts/11-authentication/04-providers/07-github/04-troubleshooting.md @@ -20,7 +20,7 @@ Go through this before investigating a specific error. Most problems come from a - [ ] Added `githubClientId` and `githubClientSecret` to `config/passwords.yaml` under the matching environment (`development:` for local, `production:` for prod), or set the matching `SERVERPOD_PASSWORD_githubClientId` and `SERVERPOD_PASSWORD_githubClientSecret` environment variables. - [ ] Added `GitHubIdpConfigFromPasswords()` to `identityProviderBuilders` in `server.dart`. - [ ] Created a `GitHubIdpEndpoint` file in `lib/src/auth/`. -- [ ] Ran `serverpod generate`, then `serverpod create-migration`, then applied migrations with `--apply-migrations`. +- [ ] Started the server with `serverpod start`. #### Client @@ -161,7 +161,7 @@ See [Configuring client IDs on the app](./customizations#configuring-client-ids- **Cause:** The keys are missing from `config/passwords.yaml`, are spelled differently, or are not present under the active environment section. -**Resolution:** Confirm both keys exist under the section matching your run mode (`development:` for `dart run bin/main.dart`, `production:` when deployed): +**Resolution:** Confirm both keys exist under the section matching your run mode (`development:` when running locally with `serverpod start`, `production:` when deployed): ```yaml development: @@ -180,9 +180,7 @@ Quotes are required because the values are strings; YAML interprets unquoted val **Resolution:** Create and apply the migration: ```bash -serverpod generate -serverpod create-migration -dart run bin/main.dart --apply-migrations +serverpod start ``` ## Android sign-in opens GitHub but the callback never fires