Skip to content

Commit

Permalink
feat: add app check
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfenrain committed Apr 2, 2024
1 parent 164c86b commit ae5fb47
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/main_debug.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
// ignore_for_file: avoid_web_libraries_in_flutter

import 'dart:async';
import 'dart:js' as js;

import 'package:api_client/api_client.dart';
import 'package:authentication_repository/authentication_repository.dart';
import 'package:board_info_repository/board_info_repository.dart';
import 'package:crossword_repository/crossword_repository.dart';
import 'package:firebase_app_check/firebase_app_check.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:io_crossword/app/app.dart';
import 'package:io_crossword/bootstrap.dart';
import 'package:io_crossword/crossword/game/game.dart';
import 'package:io_crossword/firebase_options_development.dart';

void main() async {
if (kDebugMode) {
js.context['FIREBASE_APPCHECK_DEBUG_TOKEN'] =
const String.fromEnvironment('APPCHECK_DEBUG_TOKEN');
}

WidgetsFlutterBinding.ensureInitialized();

await Firebase.initializeApp(
Expand Down
9 changes: 9 additions & 0 deletions lib/main_development.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
// ignore_for_file: avoid_web_libraries_in_flutter

import 'dart:async';
import 'dart:js' as js;

import 'package:api_client/api_client.dart';
import 'package:authentication_repository/authentication_repository.dart';
import 'package:board_info_repository/board_info_repository.dart';
import 'package:crossword_repository/crossword_repository.dart';
import 'package:firebase_app_check/firebase_app_check.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:io_crossword/app/app.dart';
import 'package:io_crossword/bootstrap.dart';
import 'package:io_crossword/firebase_options_development.dart';

void main() async {
if (kDebugMode) {
js.context['FIREBASE_APPCHECK_DEBUG_TOKEN'] =
const String.fromEnvironment('APPCHECK_DEBUG_TOKEN');
}

WidgetsFlutterBinding.ensureInitialized();

await Firebase.initializeApp(
Expand Down
6 changes: 6 additions & 0 deletions lib/main_local.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// ignore_for_file: avoid_web_libraries_in_flutter

import 'dart:async';
import 'dart:js' as js;

import 'package:api_client/api_client.dart';
import 'package:authentication_repository/authentication_repository.dart';
Expand All @@ -12,6 +15,9 @@ import 'package:io_crossword/bootstrap.dart';
import 'package:io_crossword/firebase_options_development.dart';

void main() async {
js.context['FIREBASE_APPCHECK_DEBUG_TOKEN'] =
const String.fromEnvironment('APPCHECK_DEBUG_TOKEN');

WidgetsFlutterBinding.ensureInitialized();

await Firebase.initializeApp(
Expand Down
9 changes: 9 additions & 0 deletions lib/main_staging.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
// ignore_for_file: avoid_web_libraries_in_flutter

import 'dart:async';
import 'dart:js' as js;

import 'package:api_client/api_client.dart';
import 'package:authentication_repository/authentication_repository.dart';
import 'package:board_info_repository/board_info_repository.dart';
import 'package:crossword_repository/crossword_repository.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:io_crossword/app/app.dart';
import 'package:io_crossword/bootstrap.dart';
import 'package:io_crossword/firebase_options_development.dart';

void main() async {
if (kDebugMode) {
js.context['FIREBASE_APPCHECK_DEBUG_TOKEN'] =
const String.fromEnvironment('APPCHECK_DEBUG_TOKEN');
}

WidgetsFlutterBinding.ensureInitialized();

await Firebase.initializeApp(
Expand Down

0 comments on commit ae5fb47

Please sign in to comment.