diff --git a/app/api/views.py b/app/api/views.py index a160298..a334edb 100644 --- a/app/api/views.py +++ b/app/api/views.py @@ -7,8 +7,9 @@ from django.contrib import messages from piston import forms from piston.models import Token -def oauth_callback_view(request, other): - return HttpResponse("The application you allowed access to didn't request a callback, thats odd and should be fixed") +@login_required +def oauth_callback_view(request, token): + return render_to_response('piston/callback_view.html', {'token': token }) @login_required diff --git a/app/templates/piston/callback_view.html b/app/templates/piston/callback_view.html new file mode 100644 index 0000000..9a0d592 --- /dev/null +++ b/app/templates/piston/callback_view.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %}OAuth Access Authorization{% endblock %} + +{% block content %} + +
Access is now enabled for the requesting application. It seems the application did not provide a way to give it the required information so you need to provide this to it. This has happened either due to it being a desktop application or not being configured properly.
+ +Token/PIN: {{ token }}
+ +{% endblock %}