Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit ae8707b

Browse files
author
John Austin
committed
removed app id guid
1 parent 6a16de3 commit ae8707b

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ android {
3939
}
4040

4141
dependencies {
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

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
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>
@@ -48,7 +48,7 @@
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

app/src/main/java/com/microsoft/graph/snippets/SignInActivity.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)