This repository was archived by the owner on Nov 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed
java/com/microsoft/graph/snippets Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ android {
3939}
4040
4141dependencies {
42- implementation (' com.microsoft.identity.client:msal:0.1.1 ' ){
42+ implementation (' com.microsoft.identity.client:msal:0.1.+ ' ){
4343 exclude group : ' com.android.support' , module : ' appcompat-v7'
4444 }
4545
Original file line number Diff line number Diff line change 3939 <action android : name =" android.intent.action.VIEW" />
4040 <category android : name =" android.intent.category.DEFAULT" />
4141 <category android : name =" android.intent.category.BROWSABLE" />
42- <data android : scheme =" msalb5ff44cc-39e1-4120-881b-3516085ade9a "
42+ <data android : scheme =" msalENTER_YOUR_CLIENT_ID "
4343 android : host =" auth" />
4444 </intent-filter >
4545 </activity >
4848 android : value =" https://login.microsoftonline.com/common" />
4949 <meta-data
5050 android : name =" com.microsoft.identity.client.ClientId"
51- android : value =" b5ff44cc-39e1-4120-881b-3516085ade9a " />
51+ android : value =" ENTER_YOUR_CLIENT_ID " />
5252
5353 </application >
5454
Original file line number Diff line number Diff line change @@ -226,6 +226,25 @@ public void onError(Exception exception) {
226226 public void onCancel () {
227227 Toast .makeText (this , "User cancelled the flow." , Toast .LENGTH_SHORT ).show ();
228228 }
229-
229+ /**
230+ * Handles redirect response from https://login.microsoftonline.com/common and
231+ * notifies the MSAL library that the user has completed the authentication
232+ * dialog
233+ * @param requestCode
234+ * @param resultCode
235+ * @param data
236+ */
237+ @ Override
238+ protected void onActivityResult (int requestCode , int resultCode , Intent data ) {
239+ super .onActivityResult (requestCode , resultCode , data );
240+ if (AuthenticationManager
241+ .getInstance ()
242+ .getPublicClient () != null ) {
243+ AuthenticationManager
244+ .getInstance ()
245+ .getPublicClient ()
246+ .handleInteractiveRequestRedirect (requestCode , resultCode , data );
247+ }
248+ }
230249
231250}
You can’t perform that action at this time.
0 commit comments