Skip to content

Commit

Permalink
fix(authentication): apple strategy using provider
Browse files Browse the repository at this point in the history
instead of conduit client id
fix(authentication): native login using wrong
clientid
  • Loading branch information
kkopanidis committed Jan 11, 2024
1 parent 470798e commit 8f379b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/authentication/src/handlers/oauth2/OAuth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export abstract class OAuth2<T, S extends OAuth2Settings>

return TokenProvider.getInstance().provideUserTokens({
user,
clientId: this.settings.clientId,
clientId: call.request.context.clientId,
config,
});
}
Expand Down
5 changes: 3 additions & 2 deletions modules/authentication/src/handlers/oauth2/apple/apple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
ConfigController,
RoutingManager,
} from '@conduitplatform/module-tools';
import { isNil } from 'lodash';
import { AuthUtils } from '../../../utils';

export class AppleHandlers extends OAuth2<AppleUser, AppleOAuth2Settings> {
Expand Down Expand Up @@ -139,10 +138,12 @@ export class AppleHandlers extends OAuth2<AppleUser, AppleOAuth2Settings> {
const redirectUri =
AuthUtils.validateRedirectUri(stateToken.data.customRedirectUri) ??
this.settings.finalRedirect;
const conduitClientId = stateToken.data.clientId;

return TokenProvider.getInstance()!.provideUserTokens(
{
user,
clientId,
clientId: conduitClientId,
config,
},
redirectUri,
Expand Down

0 comments on commit 8f379b6

Please sign in to comment.