File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
app/src/main/java/com/firebase/uidemo/auth
auth/src/main/java/com/firebase/ui/auth/provider Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 54
54
55
55
public class SignedInActivity extends AppCompatActivity {
56
56
57
+ private static final String EXTRA_IDP_RESPONSE = "extra_idp_response" ;
57
58
private static final String EXTRA_SIGNED_IN_CONFIG = "extra_signed_in_config" ;
58
59
59
60
@ BindView (android .R .id .content )
@@ -83,7 +84,11 @@ public static Intent createIntent(
83
84
Context context ,
84
85
IdpResponse idpResponse ,
85
86
SignedInConfig signedInConfig ) {
86
- Intent startIntent = idpResponse == null ? new Intent () : idpResponse .toIntent ();
87
+
88
+ Intent startIntent = new Intent ();
89
+ if (idpResponse != null ) {
90
+ startIntent .putExtra (EXTRA_IDP_RESPONSE , idpResponse );
91
+ }
87
92
88
93
return startIntent .setClass (context , SignedInActivity .class )
89
94
.putExtra (EXTRA_SIGNED_IN_CONFIG , signedInConfig );
@@ -100,7 +105,7 @@ public void onCreate(Bundle savedInstanceState) {
100
105
return ;
101
106
}
102
107
103
- mIdpResponse = IdpResponse . fromResultIntent ( getIntent ());
108
+ mIdpResponse = getIntent (). getParcelableExtra ( EXTRA_IDP_RESPONSE );
104
109
mSignedInConfig = getIntent ().getParcelableExtra (EXTRA_SIGNED_IN_CONFIG );
105
110
106
111
setContentView (R .layout .signed_in_layout );
Original file line number Diff line number Diff line change @@ -165,6 +165,11 @@ private void onError(GoogleSignInResult result) {
165
165
.build ();
166
166
startLogin (mActivity );
167
167
} else {
168
+ if (status .getStatusCode () == CommonStatusCodes .DEVELOPER_ERROR ) {
169
+ Log .w (TAG , "Developer error: this application is misconfigured. Check your SHA1 " +
170
+ " and package name in the Firebase console." );
171
+ Toast .makeText (mActivity , "Developer error." , Toast .LENGTH_SHORT ).show ();
172
+ }
168
173
onError (status .getStatusCode () + " " + status .getStatusMessage ());
169
174
}
170
175
}
You can’t perform that action at this time.
0 commit comments