You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,37 @@
1
1
# CHANGELOG
2
2
3
+
## 4.0.0-beta.6
4
+
5
+
### Breaking changes
6
+
7
+
-`acquireToken`, `acquireTokenSilent`, and `getAccount` may return `Promise<undefined>`. This matches what the underlying native libraries return.
8
+
- The Android `msal_config.json` file that was previously required is no longer needed and is ignored. You can safely delete this file. All options are now configurable in the config object which is passed to the `PublicClientApplication` constructor
9
+
- The `PublicClientApplication` constructor no longer takes a second `init` boolean argument, and initialization must be done manually by calling the `init` method:
10
+
```diff
11
+
-const pca = new PublicClientApplication(config, false)
12
+
+const pca = new PublicClientApplication(config) // No longer initializes client. You must do this manually 👇
13
+
try {
14
+
await pca.init();
15
+
} catch (error) {
16
+
console.log("problem in configuration/setup:", error)
17
+
}
18
+
```
19
+
- A new maven repository is required to be added to your project `build.gradle` (if you are using Expo this is done automatically for you):
console.error('Problem in configuration/setup:', error);
69
+
console.error('Error initializing the pca, check your config.', error);
71
70
}
72
-
```
73
-
74
-
If you don't provide an authority, the common one will be used. This authority will be used as the default for calls to `acquireToken` and `acquireTokenSilent`.
Instead of storing the `account` from a MSALResult for an `acquireTokenSilent` method call, you can filter the MSALAccount[] result for a particular account and use it.
// Same as `pca.removeAccount` with the exception that, if called on iOS with the `signoutFromBrowser` option set to true, it will additionally remove the account from the system browser
119
95
const params:MSALSignoutParams= {
120
-
account: result.account,
121
-
//signoutFromBrowser: true
96
+
account: result!.account,
97
+
signoutFromBrowser: true,
122
98
};
123
-
constres:boolean=awaitpca.signOut(params);
99
+
constsuccess:boolean=awaitpca.signOut(params);
124
100
```
125
101
126
-
On Android, this is the same as `removeAccount`, but on iOS, if you call it with `signoutFromBrowser: true`, it will sign you out of the browser as well.
127
-
128
102
### B2C Applications
129
103
130
104
The `PublicClientApplication` class is a bit too bare bones for dealing with a B2C application, and you will need to write a bit of code to get the desired behavior.
@@ -137,10 +111,10 @@ If you would like to see this class included in the library itself, please let u
137
111
138
112
As mentioned above, the example app demonstrates a B2C implementation
139
113
140
-
To run the example locally, first clone the repo and run `$ yarn bootstrap` to install the depedencies. Then run the following for the desired platform:
114
+
To run the example locally, first clone the repo and run `$ yarn` to bootstrap the project. Then run the following for the desired platform:
141
115
142
-
iOS: `$ yarn example ios`
143
-
Android: `$ yarn example android`
116
+
iOS: `$ yarn example ios`
117
+
Android: `$ yarn example android`
144
118
Web: `$ yarn example web` (the example app is also running live [here](https://stashenergy.github.io/react-native-msal/))
145
119
146
120
If you want to run the example using your own Azure application information:
@@ -150,8 +124,7 @@ If you want to run the example using your own Azure application information:
150
124
- iOS: `msauth.com.example://auth`
151
125
- Web (SPA): `http://localhost:19006`
152
126
1. Update the `b2cConfig` and `b2cScopes` variables in `msalConfig.ts` with your details.
153
-
1. Update the `msal_config.json` Android asset file with your details.
154
127
155
-
## Migrating from v2 to v3
128
+
## Migrating between major versions
156
129
157
-
See breaking changes in [CHANGELOG.md](CHANGELOG.md#300).
130
+
See breaking changes in [CHANGELOG.md](CHANGELOG.md).
0 commit comments