Skip to content

API documentation does not match with the provided functionality #122

Description

@minhlongdo

Hi,

I am trying to create an endpoint with the logout functionality and have read the API's documentation.
However, it seems like the API documentation is not aligned with the codebase's functionality.

 /**
     * Creates an instance of the {@link LogoutUrlBuilder} with the given return-to url.
     * i.e.:
     * <pre>
     * {@code
     * AuthAPI auth = new AuthAPI("me.auth0.com", "B3c6RYhk1v9SbIJcRIOwu62gIUGsnze", "2679NfkaBn62e6w5E8zNEzjr-yWfkaBne");
     * String url = auth.logoutUrl("https://me.auth0.com/home", true)
     *      .useFederated(true)
     *      .withAccessToken("A9CvPwFojaBIA9CvI");
     * }
     * </pre>
     *
     * @param returnToUrl the redirect_uri value to set, white-listed in the client settings. Must be already URL Encoded.
     * @param setClientId whether the client_id value must be set or not. This affects the white-list that the Auth0's Dashboard uses to validate the returnTo url.
     * @return a new instance of the {@link LogoutUrlBuilder} to configure.
     */
    public LogoutUrlBuilder logoutUrl(String returnToUrl, boolean setClientId) {
        Asserts.assertValidUrl(returnToUrl, "return to url");

        return LogoutUrlBuilder.newInstance(baseUrl, clientId, returnToUrl, setClientId);
    }

It says .withAccessToken("A9CvPwFojaBIA9CvI"); but there is no such method.

Could someone confirm if the documentation is wrong/correct?

Activity

  1. lbalmaceda commented on Apr 27, 2018

    @lbalmaceda
    Contributor

    Originally we provided a method to add the access_token parameter to the logout URL query. We removed that on #65, although the parameter is required by Facebook when trying to achieve the logout. But yes, I forgot to update the javadoc example on the AuthAPI class. Is this your use case? Do you need to set the access token? I should rollback that PR and update the javadoc.

  2. minhlongdo commented on Apr 27, 2018

    @minhlongdo
    ContributorAuthor

    I was trying to figure out a way to logout on the backend side and found this inconsistency. How would you recommend the server-side to logout, or should it be handled in the front-end only? Currently, I am providing the front-end with the access token through the back-end, so I would imagine the logout should also go through the back-end or am I missing something?

  3. stale commented on Oct 26, 2019

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed:staleIssue or PR has not seen activity recently

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions