-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating name doesn't work #155
Updating name doesn't work #155
Comments
Really weird, looking at https://github.com/CocoaPods/trunk.cocoapods.org/blob/master/app/controllers/api/sessions_controller.rb#L17 it should be working... |
Hmm... is this specific to my account, or are you able to reproduce it for yours as well? |
I haven't tried to reproduce it yet, but I did a quick audit of the code and it all seems in order |
I got the same problem. |
Might be related to #150 ? |
Accidentally had an typo in my name and would like to fix it. Any chance to change my name? Re-registring with the correct name doesn't change anything. |
Same problem for me also here. Any chance to get an update functionality? |
You're welcome to take a look at fixing it, this repo is well tested |
Re-registring with the correct name doesn't change anything. |
This problem is still there with CocoaPods 1.0.1, I register wrong name with Pod name, so I want changing it, but it's not working by I tried several times, but all failed, then I register new trunk with my another email, it seems like only first time register will setting name. |
Anybody found a workaround for this issue? |
Yeah this is still not working. Is there any work around we can use for the time being? |
Hello @orta, Seeing that many people are still running into this issue, could you provide us with an update as to what is the status of this issue? I would like to fix a naming error that I made whilst setting up a session with trunk. |
As I've mentioned, we've taken a look over it and couldn't find any obvious answers. You're welcome to take a look at figuring it out and writing a PR fixing it 👍 We work on CocoaPods in our spare time, so there is no schedule for fixing it and as this is the canonical issue for the problem - so any notes from others looking at it would go here |
Any news? |
Nope, otherwise there would be a mention in this issue. |
The issue is here: https://github.com/CocoaPods/trunk.cocoapods.org/blob/master/app/controllers/api/sessions_controller.rb#L12 When you run the After looking over this, I think this code is correct. I don't want any random person being able to submit a session registration for an already existing owner and then go about changing the name. If you took this check out of here, that would allow anybody to be able to do that. The fix for this needs to happen in the To test that theory I submitted the following curl:
And it properly updated the name to |
@paynerc greatness. Thanks a ton. Works superb. For those looking for your
|
@tallytalwar This command just print:
Is Thanks! |
Yup password is the token |
@tallytalwar Thanks! |
Yes it did work for me. Make sure to verify your session by clicking on the
link which is mailed to you first.
…On Apr 27, 2017 9:44 PM, "我的眼里只有代码" ***@***.***> wrote:
@tallytalwar <https://github.com/tallytalwar> Thanks!
But...Are you changed your name succeed?
I tried paynerc's solution, but my name still is old name, doesn't changed.
😔
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#155 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAWAwemoFNkzxWu9RHN7D1vgluQ94j9Jks5r0USJgaJpZM4GlIKQ>
.
|
Oh yeah!
And second try is succeed. Thanks, also thanks paynerc. |
Great work @paynerc, interesting. A quick look through the me command makes me think that we can't reasonably offer the ability to rename in this command. If you're using it to change your current login then sending auth for your current login seems pretty illogical. I guess we'll need a new command for rename that is basically the same code but includes |
@orta Yeah, it seems counterintuitive to have to have a valid session first and then create a new one just to change your name. The only way I think changing the name on session registration would work is that for a name change, the new name is stored somewhere temporarily and only overwriting the previous name on the verify action. |
I've shipped a PR adding the command |
pod trunk me rename 'NAME' |
@lyc2345 I changed my name using paynerc's solution. You should try it. |
Worked for me too, I had to "Confirm the session" twice for this to work, first time to get an auth token and second time to update the name. |
Can we please get this fixed? Looking at the code @paynerc cited, my impression is the problem is that it's trying to set the owner name at the point where you attempt the registration, not the point where you confirm the session. If so, that's the big problem. The "confirm your session" should use the name supplied during the registration but not actually save that to the database yet, and then actually confirming it should save the supplied name. This also makes me wonder, if I pick an email address that hasn't been registered yet, attempt to register with a bogus name, but never confirm the session (because it's not my email), when the actual owner of that email goes to register for themselves, will they be stuck with the bogus name? |
I accidentally used the wrong name when I was setting up CocoaPods. It seems that simply registering again with a new name should let me update it (
trunk.cocoapods.org/app/models/owner.rb
Lines 31 to 38 in e0be3b3
The text was updated successfully, but these errors were encountered: