feat(OAuth): add 'iss' parameter to OAuth exchange methods for improved provider handling
All checks were successful
Deploy to production / deploy (push) Successful in 1m57s
All checks were successful
Deploy to production / deploy (push) Successful in 1m57s
This commit is contained in:
@@ -24,7 +24,7 @@ export default {
|
||||
methods: {
|
||||
...mapActions(['login']),
|
||||
async finishLogin() {
|
||||
const { code, state, error, error_description: errorDescription } = this.$route.query;
|
||||
const { code, state, iss, error, error_description: errorDescription } = this.$route.query;
|
||||
|
||||
if (error) {
|
||||
this.hasError = true;
|
||||
@@ -39,7 +39,11 @@ export default {
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await apiClient.post('/api/auth/oauth/exchange', { code, state });
|
||||
const payload = { code, state };
|
||||
if (iss) {
|
||||
payload.iss = iss;
|
||||
}
|
||||
const response = await apiClient.post('/api/auth/oauth/exchange', payload);
|
||||
await this.login({ user: response.data, rememberMe: true });
|
||||
await this.$router.replace('/settings/personal');
|
||||
} catch (loginError) {
|
||||
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async finishLinking() {
|
||||
const { code, state, error, error_description: errorDescription } = this.$route.query;
|
||||
const { code, state, iss, error, error_description: errorDescription } = this.$route.query;
|
||||
|
||||
if (error) {
|
||||
this.hasError = true;
|
||||
@@ -43,7 +43,11 @@ export default {
|
||||
|
||||
try {
|
||||
this.statusText = 'Authentifizierung wird mit deinem Konto verknüpft...';
|
||||
const response = await apiClient.post('/api/auth/oauth/user/exchange', { code, state });
|
||||
const payload = { code, state };
|
||||
if (iss) {
|
||||
payload.iss = iss;
|
||||
}
|
||||
const response = await apiClient.post('/api/auth/oauth/user/exchange', payload);
|
||||
|
||||
this.message = 'Erfolgreich verknüpft!';
|
||||
this.statusText = `${response.data.identity.displayName} wurde erfolgreich hinzugefügt. Du kannst diese Seite jetzt schließen oder zur Sicherheitsseite zurückkehren.`;
|
||||
|
||||
Reference in New Issue
Block a user