Skip to content
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

Feature/back/auth0 #32

Merged
merged 5 commits into from
Jan 28, 2025
Merged

Feature/back/auth0 #32

merged 5 commits into from
Jan 28, 2025

Conversation

FranCalveyra
Copy link
Contributor

No description provided.

Started integrating auth0 to the repository, separated controller into controller and router, moved database starting method to a separated file

Referred issue: #30
Removed unused gin dependencies, changed docker-compose.yml for it to use env ports

Referred issue: #30
Added gin to the application, still need to figure why the authenticator isn't working

Referred issue: #30
Now routes are protected, added authentication functionality, made some changes in config.

BREAKING CHANGE: Can now protect routes with Auth0
Referred issue: #30
@FranCalveyra FranCalveyra self-assigned this Jan 28, 2025
Copy link
Contributor

@GuidoM197 GuidoM197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo ok! 👍

Comment on lines +57 to 61
routerError := ginRouter.Run(":" + serverPort)
if routerError != nil {
fmt.Println("Failed to start server")
return
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Estos son detalles de escritura de go, podrías reemplazar este pedazo de código por:

	if routerError := ginRouter.Run(":" + serverPort); routerError != nil {
		fmt.Println("Failed to start server")
		return
	}

Sin embargo, esto no siempre funciona. Esto es debido a que en el caso de que esta funcion retorne 2 valores, nos presentara un error si usamos alguno de estos en la posterioridad. Esto pasa ya que en un if existe la posibilidad de que nunca suceda lo que sigue despues de este.

@FranCalveyra FranCalveyra merged commit 02b633d into dev Jan 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants