-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mit 27 add attion crm #326
Changes from all commits
0b4fa27
9f11d32
14b5f4f
66b6a3b
08e7a0a
9459865
8637c30
a4553d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
VITE_BACKEND_DOMAIN=http://localhost:3000 | ||
VITE_ML_FRONTEND_URL=http://127.0.0.1:5173 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ const ProviderModal = () => { | |
|
||
const { open, isReady } = useOAuth({ | ||
providerName: selectedProvider, | ||
returnUrl: config.ML_FRONTEND_URL!, | ||
returnUrl: "https://google.com", //TODO: handle the redirection URL (let customer put their confetti or success page redirect url ? ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change to a hardcoded |
||
projectId: linkedUser?.id_project as string, | ||
linkedUserId: linkedUser?.id_linked_user as string, | ||
onSuccess: () => console.log('OAuth successful'), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,10 @@ | |
Body, | ||
Get, | ||
UseGuards, | ||
Query, | ||
Res, | ||
} from '@nestjs/common'; | ||
import { Response } from 'express'; | ||
import { CreateUserDto } from './dto/create-user.dto'; | ||
import { AuthService } from './auth.service'; | ||
import { JwtAuthGuard } from './guards/jwt-auth.guard'; | ||
|
@@ -15,7 +15,7 @@ | |
import { ApiBody, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; | ||
import { ApiKeyDto } from './dto/api-key.dto'; | ||
import { LoginDto } from './dto/login.dto'; | ||
import { ApiKeyAuthGuard } from './guards/api-key.guard'; | ||
|
||
@ApiTags('auth') | ||
@Controller('auth') | ||
|
@@ -69,19 +69,4 @@ | |
data.keyName, | ||
); | ||
} | ||
|
||
@Get('/callback') | ||
async callback(@Query() query: { token: string }, @Res() res: Response) { | ||
const user = await this.authService.validateStytchToken(query.token); | ||
|
||
await this.authService.createUser({ | ||
email: user.emails[0].email, | ||
first_name: user.name.first_name, | ||
last_name: user.name.last_name, | ||
password_hash: '', | ||
}); | ||
|
||
//TODO make it dynamic | ||
res.redirect('http://localhost/callback/?token=' + query.token); | ||
} | ||
} | ||
Comment on lines
69
to
72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The removal of the - import { Query, Res, Response } from 'express';
- import { ApiKeyAuthGuard } from './guards/api-key.guard'; |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The verification process has revealed that the changes to environment variables, specifically the removal of Stytch-related variables and the addition of Attio-specific ones, could significantly impact the application's configuration, deployment, and authentication mechanisms. The presence of these variables in Docker configurations and application code suggests that careful consideration and potential updates are required to ensure the application functions correctly with the new authentication provider. It is recommended to review and update the application's configuration, deployment scripts, and authentication logic to accommodate the transition from Stytch to Attio.
Analysis chain
The changes to environment variables in
.env.example
are correctly implemented and align with the PR objectives. Ensure to verify the impact on the application configuration.Scripts Executed
The following scripts were executed for the analysis:
Script:
Length of output: 211
Script:
Length of output: 20393