Skip to content
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

Login and session #4

Merged
merged 13 commits into from Dec 8, 2015
Merged

Login and session #4

merged 13 commits into from Dec 8, 2015

Conversation

@stansidel
Copy link
Contributor

@stansidel stansidel commented Nov 23, 2015

Hi Ryan!

I've finally made this. The user can now login using their credentials. The login information is stored in the shared session which persists across the app's relaunches. There's a bar item button for login/logout, a login view and network tools for the feature.

The HNService class was modified a little bit for two reasons:

  1. It can now perform POST requests alongside GET requests.
  2. The stringByAppendingPathComponent: function used to compose a string representation of the URL doesn't work well with URLs actually. It's stated in the documentation: Note that this method only works with file paths (not, for example, string representations of URLs).. The downside of the function is that it turns "https://news.ycombinator.com" into "https:/news.ycombinator.com", and while the latter does allow the app to fetch data it doesn't use cookies stored for the former (during the login process).

I hope the changes feel well. If anything (hopefully that won't be the whole request though) isn't consistent with the app's design I would love to modify it.

@rnystrom
Copy link
Owner

@rnystrom rnystrom commented Nov 27, 2015

Omg this is the coolest! I'm slammed lately but will try to spin through all this. If I don't get back soon ping me on Twitter. This is so awesome!!

@rnystrom
Copy link
Owner

@rnystrom rnystrom commented Dec 8, 2015

@stansidel Hey man! So I took a look and this is really great! I think that I will merge this, but likely strip out some things. For starters, I would like to make the login VC a tab. Once you login, you'll see a "profile" VC that you can then look at your posts/comments from.

Is that ok? I'll make sure to leave your name in the files that are used, even if rearranged a bit.

@stansidel
Copy link
Contributor Author

@stansidel stansidel commented Dec 8, 2015

@rnystrom Hi Ryan! It's great you like the changes! What you described looks awesome to me. I'm eager to see the changes.

rnystrom added a commit that referenced this pull request Dec 8, 2015
@rnystrom rnystrom merged commit 2061b8d into rnystrom:master Dec 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.