Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

TypeError: Incorrect padding #7

@codingisacopingstrategy

Description

The vanilla example app balks for me

Might this be related to the new signed_request?
That’s what this Stack Overflow article seems to suggest

http://stackoverflow.com/questions/3302946/how-to-base64-url-decode-in-python

But I can’t really wrap my had around it.

Thanks,

Traceback (most recent call last):
  File "/app/lib/python2.7/site-packages/flask/app.py", line 1306, in __call__
    return self.wsgi_app(environ, start_response)
  File "/app/lib/python2.7/site-packages/flask/app.py", line 1294, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/app/lib/python2.7/site-packages/flask/app.py", line 1292, in wsgi_app
    response = self.full_dispatch_request()
  File "/app/lib/python2.7/site-packages/flask/app.py", line 1062, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/app/lib/python2.7/site-packages/flask/app.py", line 1060, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/lib/python2.7/site-packages/flask/app.py", line 1047, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/app/exampleapp.py", line 167, in index
    access_token = get_token()
  File "/app/exampleapp.py", line 134, in get_token
    data = json.loads(urlsafe_b64decode(str(encoded_data[1])))
  File "/usr/local/lib/python2.7/base64.py", line 112, in urlsafe_b64decode
    """
  File "/usr/local/lib/python2.7/base64.py", line 76, in b64decode
    # Transform this exception for consistency
TypeError: Incorrect padding

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions