-
Notifications
You must be signed in to change notification settings - Fork 930
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pooya parsa
committed
May 24, 2019
1 parent
270f138
commit fd89224
Showing
1 changed file
with
7 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,19 +109,16 @@ export default class LocalScheme { | |
this.$auth.setUser(user) | ||
} | ||
|
||
async logout (endpoint) { | ||
// Making sure that endpoint is an Object | ||
if (!endpoint || endpoint.constructor !== Object) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
pi0
Member
|
||
endpoint = { data: {} } | ||
} | ||
|
||
async logout (endpoint = {}) { | ||
// Only connect to logout endpoint if it's configured | ||
if (this.options.endpoints.logout) { | ||
const payloadProperties = this.options.endpoints.logout.payloadProperties | ||
|
||
// Only add client id to payload if enabled | ||
if (payloadProperties.clientId !== false) { | ||
endpoint.data[payloadProperties.clientId] = this.$auth.getClientId(this.name) | ||
const { clientId } = this.options.endpoints.logout | ||
This comment has been minimized.
Sorry, something went wrong.
JoaoPedroAS51
Collaborator
|
||
if (clientId) { | ||
if (!endpoint.data) { | ||
endpoint.data = {} | ||
} | ||
endpoint.data[clientId] = this.$auth.getClientId(this.name) | ||
} | ||
|
||
await this.$auth | ||
|
@pi0 I added this because in my test
endpoint
value was"local"