diff --git a/lib/pangea/login/pages/create_pangea_account_page.dart b/lib/pangea/login/pages/create_pangea_account_page.dart index 7814ada55..e199c2d12 100644 --- a/lib/pangea/login/pages/create_pangea_account_page.dart +++ b/lib/pangea/login/pages/create_pangea_account_page.dart @@ -165,8 +165,17 @@ class CreatePangeaAccountPageState extends State { } try { - final targetLangCode = await _targetLangCode; final baseLangCode = await _baseLangCode; + final targetLangCode = await _targetLangCode; + + // User's L2 is not set and they niether have a target language in their + // local storage nor can they get it from a course they plan to join. + // Redirect back to language selection. + // This can happen if a user creates a new account via login => SSO + if (targetLangCode == null) { + context.go('/registration'); + } + final updateFuture = [ _setAvatar(), MatrixState.pangeaController.userController.updateProfile(