Tinacms: onLogin of TinacmsGithubProvider is no longer triggered

Created on 1 Dec 2020  ยท  3Comments  ยท  Source: tinacms/tinacms

Description

onLogin of TinacmsGithubProvider is no longer called when cms enabled.

Steps to reproduce

Just setup next.js + github exactly as it is in the guide: https://tina.io/guides/nextjs/github/initial-setup/
Click to "Edit this page" button

Expected result

The base branch should be checkout, the preview mode should be activated

Actual result

Preview mode is not activated and the branch is not checked out.

Environment

MacOS

Tinacms Package Versions

โ”œโ”€โ”€ UNMET PEER DEPENDENCY @tinacms/core@^0.29.0
โ”œโ”€โ”€ UNMET PEER DEPENDENCY @tinacms/fields@^0.29.0
โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”œโ”€โ”€ UNMET PEER DEPENDENCY @tinacms/[email protected]
โ”‚ โ”œโ”€โ”€ UNMET PEER DEPENDENCY @tinacms/fields@^0.29.0
โ”œโ”€โ”ฌ [email protected]
โ”œโ”€โ”ฌ [email protected]
โ”‚ โ””โ”€โ”ฌ [email protected]
โ”œโ”€โ”ฌ [email protected]
โ”œโ”€โ”ฌ [email protected]
โ”‚ โ”œโ”€โ”€ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”ฌ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”ฌ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”ฌ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”€ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”€ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”ฌ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”ฌ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”€ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”€ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”ฌ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”ฌ @tinacms/[email protected]
โ”‚ โ”œโ”€โ”ฌ @tinacms/[email protected]

Tools

| Tool | Version |
| ------- | ------- |
| browser | chrome |
| os | macos |
| node | v12.18.3 |
| npm | 6.14.6 |

NOTES

I believe that this is a degradation because of this commit: https://github.com/tinacms/tinacms/commit/6580c8afa247e3d6a1beb9d7e4967b45c130fa1e

TinacmsGithubProvider calls github.checkout on a success authorization of a base branch with gihtub.branchName, and then checkout compares it with this.branchName and does nothing, which produces the bug.

bug

Most helpful comment

+1 this has been very confusing trying to spin up a new project locally.

EDIT: confirmed that updating TinaCMS packages to "0.33.0" fixes the issue I was seeing where clicking "Edit this site" doesn't set the TinaCMS object = enabled, and doesn't set the proper cookies for preview mode.

All 3 comments

+1 this has been very confusing trying to spin up a new project locally.

EDIT: confirmed that updating TinaCMS packages to "0.33.0" fixes the issue I was seeing where clicking "Edit this site" doesn't set the TinaCMS object = enabled, and doesn't set the proper cookies for preview mode.

@all-contributors add @c58 for bugs

@dwalkr

I've put up a pull request to add @c58! :tada:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sampangpang picture Sampangpang  ยท  4Comments

kendallstrautman picture kendallstrautman  ยท  3Comments

lyleunderwood picture lyleunderwood  ยท  4Comments

aratner picture aratner  ยท  4Comments

jpuri picture jpuri  ยท  4Comments