Skip to content
Discussion options

You must be logged in to vote

Finally figured it out. I don't know if this violates any best security practices but I did the following:

func (s *Auth) LoginGET(c fiber.Ctx) error {
	loginChallenge := c.Query("login_challenge")
	session := session.GetSession(c)

	if loginChallenge != "" {
		if session != nil {
			// if ory hydra login_challenge and session exists, accept login request
			alReq := hydra.NewAcceptOAuth2LoginRequest(session.Identity.Id)
			alReq.IdentityProviderSessionId = &session.Id
			alReq.Remember = x.Ptr(true)
			for _, r := range session.AuthenticationMethods {
				alReq.Amr = append(alReq.Amr, r.GetMethod())
			}

			alRes, _, err := s.hydraAdmin.OAuth2API.AcceptOAuth2LoginRequest(c).LoginChallenge(

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Codebreaker101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant