Skip to content
This repository

Generate API key button generating in the database, but doesn't show on edit user page #1521

Closed
doktorj opened this Issue · 2 comments

3 participants

doktor J Ryan Bigg 影月 零
doktor J
doktorj commented

Hi, I did a fresh reinstall of my blank Rails 3.2 app with mysql, and Spree as a gem, using the using: gem 'spree', :git => "git://github.com/spree/spree", :branch => "1-1-stable" (I used this gem config, suggested by Radar after initially attempting to follow the readme here: https://github.com/spree/spree/tree/1-1-stable which says to use 'gem install 1.1.0' with which the 'generate Api key' button does not even exist)

Now, after a fresh install, I can see the 'Generate Api token button', so I click it for my admin user it says 'Key generated', but only 'No key' shows up on the edit user page...although I do notice that when I look in the database I can see the key has been generated in the spree_users, api_key column.

doktor J
doktorj commented

Quick update: I forked the source and found that _api_fields.html.erb does a: @user.authentication_token.present? and when I try that in my rails console with my admin user it returns false. As of yet, I still do not see where authentication_token actually gets generated, as I only see a method for: generate_api_key! So hmm

影月 零

I can confirm this in current 1-1-stable, but I am under the impression Radar fixed this in master. I'll do my best to double check ASAP.

EDIT: This is on a fresh 1-1-stable install I built on 5/6 that I get this.

doktor J doktorj referenced this issue from a commit
doktor J Updated @user.authentication_token.present? check, and print out
to use @user.api_key instead in the api_fields partial.
Not sure why @user_authentication_token was being used instead.

[Fixes #1521]
c292017
Ryan Bigg radar closed this issue from a commit
doktor J Updated @user.authentication_token.present? check, and print out to u…
…se @user.api_key instead in the api_fields partial. Not sure why @user_authentication_token was being used instead.

[Fixes #1521]

Merges #1522
62e1a5b
Ryan Bigg radar closed this in 62e1a5b
cnight cnight referenced this issue from a commit in cnight/spree
doktor J Updated @user.authentication_token.present? check, and print out to u…
…se @user.api_key instead in the api_fields partial. Not sure why @user_authentication_token was being used instead.

[Fixes #1521]

Merges #1522
fe6b5f7
David Demers fonemstr referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Thomas von Deyen tvdeyen referenced this issue from a commit in magiclabs/spree
doktor J Updated @user.authentication_token.present? check, and print out to u…
…se @user.api_key instead in the api_fields partial. Not sure why @user_authentication_token was being used instead.

[Fixes #1521]

Merges #1522
1cc01fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.