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

This commit is contained in:
Torsten Schulz (local)
2026-05-15 14:58:38 +02:00
parent 52f2d52916
commit e179dc714b
4 changed files with 25 additions and 10 deletions

View File

@@ -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) {

View File

@@ -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.`;