Skip to content

next_link not used in flask.Auth.login #27

@runxiyu

Description

@runxiyu

(This issue is based on what's in commit 341420da9adc02e498b8bf55fa319d5c091593ff)

flask.Auth.login_required (which the documentation recommends me to use) calls flask.Auth.login with a seemingly correct next_link attribute:

    def login(self, *, next_link: str=None, scopes: List[str]=None):
        ...
            return self.login(
                next_link=request.path,  # https://flask.palletsprojects.com/en/3.0.x/api/#flask.Request.path
                scopes=scopes,
                )

But flask.Auth.login never uses next_link where it probably should:

        log_in_result = self._auth.log_in(
            scopes=scopes,  # Have user consent to scopes (if any) during log-in
            redirect_uri=self._redirect_uri,
            prompt="select_account",  # Optional. More values defined in  https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
            )

It seems that adding next_link=next_link as a parameter works.

        log_in_result = self._auth.log_in(
            scopes=scopes,  # Have user consent to scopes (if any) during log-in
            redirect_uri=self._redirect_uri,
            next_link=next_link,
            prompt="select_account",  # Optional. More values defined in  https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
            )

Apologies on how I am quite unfamiliar with GitHub issues. I've read that there's a predefined way to quote and link lines but I don't seem to know how to get that to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions